# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListType
from pyangbind.lib.yangtypes import YANGDynClass
from pyangbind.lib.yangtypes import ReferenceType
from pyangbind.lib.base import PybindBase
from collections import OrderedDict
from decimal import Decimal
from bitarray import bitarray
import six

# PY3 support of some PY2 keywords (needs improved)
if six.PY3:
  import builtins as __builtin__
  long = int
elif six.PY2:
  import __builtin__

class openconfig_qos_elements(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /openconfig-qos-elements. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated with QoS elements.  The primary elements of
the model include:

 classifiers: match packets with a specific characteristic

 forwarding groups: logical class of packets that receive
 common forwarding treatment

 queues:  collection of packets to be scheduled, including
 a queue management scheme

 schedulers: sequence of one more elements that schedule
 packets for transmission, including policer and shaper
 functions
  """
  _pyangbind_elements = {}

  

class openconfig_qos_mem_mgmt(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /openconfig-qos-mem-mgmt. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated related to queue management features of QoS
particularly:

- buffer-allocation-profiles: these profiles are applied on
 a per-interface basis, and determine how memory is to be managed
 across the queues that are instantiated on the system.

- queue-management-profiles: these profiles are applied on a per-interface
 per-queue basis, and determine how packets are marked/dropped within
 the queue instantiation.
  """
  _pyangbind_elements = {}

  

class openconfig_qos_elements(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /openconfig-qos-elements. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated with QoS elements.  The primary elements of
the model include:

 classifiers: match packets with a specific characteristic

 forwarding groups: logical class of packets that receive
 common forwarding treatment

 queues:  collection of packets to be scheduled, including
 a queue management scheme

 schedulers: sequence of one more elements that schedule
 packets for transmission, including policer and shaper
 functions
  """
  _pyangbind_elements = {}

  

class openconfig_qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /openconfig-qos-interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines data related to quality-of-service
configuration and operational state associated with
interfaces.
  """
  _pyangbind_elements = {}

  

class openconfig_qos_elements(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /openconfig-qos-elements. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated with QoS elements.  The primary elements of
the model include:

 classifiers: match packets with a specific characteristic

 forwarding groups: logical class of packets that receive
 common forwarding treatment

 queues:  collection of packets to be scheduled, including
 a queue management scheme

 schedulers: sequence of one more elements that schedule
 packets for transmission, including policer and shaper
 functions
  """
  _pyangbind_elements = {}

  

class openconfig_qos_mem_mgmt(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /openconfig-qos-mem-mgmt. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated related to queue management features of QoS
particularly:

- buffer-allocation-profiles: these profiles are applied on
 a per-interface basis, and determine how memory is to be managed
 across the queues that are instantiated on the system.

- queue-management-profiles: these profiles are applied on a per-interface
 per-queue basis, and determine how packets are marked/dropped within
 the queue instantiation.
  """
  _pyangbind_elements = {}

  

class yc_config_openconfig_qos__qos_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_state_openconfig_qos__qos_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_config_openconfig_qos__qos_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/interface-ref/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configured reference to interface / subinterface
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_qos__qos_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/interface-ref/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for interface-ref
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_interface_ref_openconfig_qos__qos_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/interface-ref. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)

    YANG Description: Configured reference to interface / subinterface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configured reference to interface / subinterface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)

    YANG Description: Operational state for interface-ref
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state for interface-ref
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos__qos_interfaces_interface_input_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos__qos_interfaces_interface_input_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos__qos_interfaces_interface_input_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

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

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_input_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_voq_interface_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'voq-interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_virtual_output_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input/virtual-output-queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__voq_interface',)

  _yang_name = 'virtual-output-queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues']

  def _get_voq_interface(self):
    """
    Getter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    return self.__voq_interface
      
  def _set_voq_interface(self, v, load=False):
    """
    Setter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_voq_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_voq_interface() directly.

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_voq_interface_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """voq_interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_voq_interface(self):
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  voq_interface = __builtin__.property(_get_voq_interface, _set_voq_interface)


  _pyangbind_elements = OrderedDict([('voq_interface', voq_interface), ])


class yc_input_openconfig_qos__qos_interfaces_interface_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data for the ingress
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy','__virtual_output_queues',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)

    YANG Description: Configuration data for QoS on ingress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)

    YANG Description: Operational state data for QoS on ingress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_virtual_output_queues(self):
    """
    Getter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    return self.__virtual_output_queues
      
  def _set_virtual_output_queues(self, v, load=False):
    """
    Setter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_output_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_output_queues() directly.

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_virtual_output_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_output_queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_virtual_output_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_virtual_output_queues(self):
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)
  virtual_output_queues = __builtin__.property(_get_virtual_output_queues, _set_virtual_output_queues)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ('virtual_output_queues', virtual_output_queues), ])


class yc_config_openconfig_qos__qos_interfaces_interface_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos__qos_interfaces_interface_output_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos__qos_interfaces_interface_output_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos__qos_interfaces_interface_output_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos__qos_interfaces_interface_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

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

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_output_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_output_openconfig_qos__qos_interfaces_interface_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data related to the egress
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)

    YANG Description: Configuration data for QoS on the egress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)

    YANG Description: Operational state data for QoS on the egress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ])


class yc_interface_openconfig_qos__qos_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__input','__output',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__input = YANGDynClass(base=yc_input_openconfig_qos__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to the interface-id list key
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Reference to the interface-id list key
    """
    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=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)

    YANG Description: Operational state data 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_ref is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_ref() directly.

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_qos__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_ref must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_ref_openconfig_qos__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_input_openconfig_qos__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_input_openconfig_qos__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_input(self):
    self.__input = YANGDynClass(base=yc_input_openconfig_qos__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  input = __builtin__.property(_get_input, _set_input)
  output = __builtin__.property(_get_output, _set_output)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('input', input), ('output', output), ])


class yc_interfaces_openconfig_qos__qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface (list)

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_qos__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for classifers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for list of match criteria in a QoS
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  id = __builtin__.property(_get_id, _set_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for list of match criteria in a
QoS classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'config']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)""",
        })

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

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

  source_mac = __builtin__.property(_get_source_mac, _set_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask, _set_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac, _set_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask, _set_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype, _set_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State Information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'state']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)""",
        })

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

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)

  source_mac = __builtin__.property(_get_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_l2_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/l2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Ethernet header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'l2'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)

    YANG Description: State Information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State Information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

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

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

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

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

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

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

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

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

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

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

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

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

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

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

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

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)

    YANG Description: State attributes for ICMPv4 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for IPv4 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv4',)

  _yang_name = 'ipv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)

    YANG Description: Configuration data for IPv4 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)

    YANG Description: State information for IPv4 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State information for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv4(self):
    """
    Getter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)

    YANG Description: Top container for ICMPv4 filtering
    """
    return self.__icmpv4
      
  def _set_icmpv4(self, v, load=False):
    """
    Setter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv4() directly.

    YANG Description: Top container for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_icmpv4(self):
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv4 = __builtin__.property(_get_icmpv4, _set_icmpv4)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv4', icmpv4), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

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

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

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

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

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

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

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

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

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

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

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

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label, _set_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label, _set_destination_flow_label)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

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

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

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

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

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

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

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

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

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

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

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

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)

    YANG Description: State attributes for ICMPv6 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for IPv6 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv6',)

  _yang_name = 'ipv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)

    YANG Description: Configuration data for IPv6 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)

    YANG Description: Operational state data for IPv6 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv6(self):
    """
    Getter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)

    YANG Description: Top container for ICMPv6 filtering
    """
    return self.__icmpv6
      
  def _set_icmpv6(self, v, load=False):
    """
    Setter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv6() directly.

    YANG Description: Top container for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_icmpv6(self):
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv6 = __builtin__.property(_get_icmpv6, _set_icmpv6)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv6', icmpv6), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'config']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

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

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

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

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  source_port = __builtin__.property(_get_source_port, _set_source_port)
  source_port_set = __builtin__.property(_get_source_port_set, _set_source_port_set)
  destination_port = __builtin__.property(_get_destination_port, _set_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set, _set_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode, _set_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode, _set_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags, _set_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail, _set_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'state']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

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

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

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

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  source_port = __builtin__.property(_get_source_port)
  source_port_set = __builtin__.property(_get_source_port_set)
  destination_port = __builtin__.property(_get_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_transport_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport fields container
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)

    YANG Description: State data
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to fields within
the MPLS header.
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'config']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)""",
        })

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

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

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

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

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

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  traffic_class = __builtin__.property(_get_traffic_class, _set_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value, _set_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value, _set_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value, _set_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to fields
within the MPLS header
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'state']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)""",
        })

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

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

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

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

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

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  traffic_class = __builtin__.property(_get_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_mpls_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_conditions_openconfig_qos__qos_classifiers_classifier_terms_term_conditions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/conditions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__l2','__ipv4','__ipv6','__transport','__mpls',)

  _yang_name = 'conditions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions']

  def _get_l2(self):
    """
    Getter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)

    YANG Description: Ethernet header fields
    """
    return self.__l2
      
  def _set_l2(self, v, load=False):
    """
    Setter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2() directly.

    YANG Description: Ethernet header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_l2(self):
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv4(self):
    """
    Getter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)

    YANG Description: Top level container for IPv4 match field data
    """
    return self.__ipv4
      
  def _set_ipv4(self, v, load=False):
    """
    Setter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4() directly.

    YANG Description: Top level container for IPv4 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_ipv4(self):
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv6(self):
    """
    Getter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)

    YANG Description: Top-level container for IPv6 match field data
    """
    return self.__ipv6
      
  def _set_ipv6(self, v, load=False):
    """
    Setter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6() directly.

    YANG Description: Top-level container for IPv6 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_ipv6(self):
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)

    YANG Description: Transport fields container
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transport is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transport() directly.

    YANG Description: Transport fields container
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transport must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transport_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_transport(self):
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)

    YANG Description: MPLS header fields
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls() directly.

    YANG Description: MPLS header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_mpls(self):
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  l2 = __builtin__.property(_get_l2, _set_l2)
  ipv4 = __builtin__.property(_get_ipv4, _set_ipv4)
  ipv6 = __builtin__.property(_get_ipv6, _set_ipv6)
  transport = __builtin__.property(_get_transport, _set_transport)
  mpls = __builtin__.property(_get_mpls, _set_mpls)


  _pyangbind_elements = OrderedDict([('l2', l2), ('ipv4', ipv4), ('ipv6', ipv6), ('transport', transport), ('mpls', mpls), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied to packets that match the classifier
term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'config']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  target_group = __builtin__.property(_get_target_group, _set_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters associated with classifier term
actions
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'state']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  target_group = __builtin__.property(_get_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions/remark/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions/remark/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_remark_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions/remark. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remark'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)

    YANG Description: Configuration parameters relating to remarking packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)

    YANG Description: Operational state parameters relating to remarking packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_actions_openconfig_qos__qos_classifiers_classifier_terms_term_actions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term/actions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied for packets matching the specified
classification rules.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__remark',)

  _yang_name = 'actions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_remark(self):
    """
    Getter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    return self.__remark
      
  def _set_remark(self, v, load=False):
    """
    Setter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remark() directly.

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remark_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remark must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remark_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_remark(self):
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  remark = __builtin__.property(_get_remark, _set_remark)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('remark', remark), ])


class yc_term_openconfig_qos__qos_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms used in the classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state','__conditions','__actions',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to id list key.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to id list key.
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conditions(self):
    """
    Getter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    return self.__conditions
      
  def _set_conditions(self, v, load=False):
    """
    Setter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conditions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conditions() directly.

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conditions_openconfig_qos__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conditions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conditions_openconfig_qos__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_conditions(self):
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_actions(self):
    """
    Getter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    return self.__actions
      
  def _set_actions(self, v, load=False):
    """
    Setter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_actions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_actions() directly.

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_actions_openconfig_qos__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """actions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_actions_openconfig_qos__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_actions(self):
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conditions = __builtin__.property(_get_conditions, _set_conditions)
  actions = __builtin__.property(_get_actions, _set_actions)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ('conditions', conditions), ('actions', actions), ])


class yc_terms_openconfig_qos__qos_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for ths list of terms
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms used in the classifier
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms used in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos__qos_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of classifier elements
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)

    YANG Description: Reference to list key name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to list key name
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)

    YANG Description: Configuration data for classifers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for classifers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)

    YANG Description: Operational state data for classifiers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for ths list of terms
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for ths list of terms
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos__qos_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for QoS classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)

    YANG Description: List of classifier elements
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: List of classifier elements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_classifier_openconfig_qos__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos__qos_forwarding_groups_forwarding_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/forwarding-groups/forwarding-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  fabric_priority = __builtin__.property(_get_fabric_priority, _set_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue, _set_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue, _set_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue, _set_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_state_openconfig_qos__qos_forwarding_groups_forwarding_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/forwarding-groups/forwarding-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'forwarding-groups', 'forwarding-group', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  fabric_priority = __builtin__.property(_get_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_forwarding_group_openconfig_qos__qos_forwarding_groups_forwarding_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/forwarding-groups/forwarding-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'forwarding-group'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)

    YANG Description: Reference to name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to name list key
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)

    YANG Description: Configuration data for forwarding groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)

    YANG Description: Operational state data for forwarding groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_forwarding_groups_openconfig_qos__qos_forwarding_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/forwarding-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_group',)

  _yang_name = 'forwarding-groups'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'forwarding-groups']

  def _get_forwarding_group(self):
    """
    Getter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    return self.__forwarding_group
      
  def _set_forwarding_group(self, v, load=False):
    """
    Setter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_group() directly.

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_forwarding_group_openconfig_qos__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_forwarding_group(self):
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  forwarding_group = __builtin__.property(_get_forwarding_group, _set_forwarding_group)


  _pyangbind_elements = OrderedDict([('forwarding_group', forwarding_group), ])


class yc_config_openconfig_qos__qos_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_id = __builtin__.property(_get_queue_id, _set_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_state_openconfig_qos__qos_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  name = __builtin__.property(_get_name)
  queue_id = __builtin__.property(_get_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_queue_openconfig_qos__qos_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)

    YANG Description: Reference to the queue name list key.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue name list key.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queues/queue/config (container)

    YANG Description: Configuration data for queues
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queues/queue/state (container)

    YANG Description: Operational state data for queues
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos__qos_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/queues/queue (list)

    YANG Description: List of defined queues
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: List of defined queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'config']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  type = __builtin__.property(_get_type, _set_type)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  type = __builtin__.property(_get_type)
  priority = __builtin__.property(_get_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  input_type = __builtin__.property(_get_input_type, _set_input_type)
  queue = __builtin__.property(_get_queue, _set_queue)
  weight = __builtin__.property(_get_weight, _set_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)

  id = __builtin__.property(_get_id)
  input_type = __builtin__.property(_get_input_type)
  queue = __builtin__.property(_get_queue)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_input_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of input sources for the scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)

    YANG Description: Reference to list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)

    YANG Description: Configuration data for scheduler input sources
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)

    YANG Description: Operational state data for scheduler input sources
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ])


class yc_inputs_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container 
  """
  __slots__ = ('_path_helper', '_extmethods', '__input',)

  _yang_name = 'inputs'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs']

  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)

    YANG Description: List of input sources for the scheduler.
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: List of input sources for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_input_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_input(self):
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  input = __builtin__.property(_get_input, _set_input)


  _pyangbind_elements = OrderedDict([('input', input), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'config']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  output_type = __builtin__.property(_get_output_type, _set_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler, _set_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group, _set_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'state']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  output_type = __builtin__.property(_get_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_output_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for scheduler output data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)

    YANG Description: Configuration data for scheduler output
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)

    YANG Description: Operational state data for scheduler output
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)""",
        })

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

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior, _set_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes, _set_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets, _set_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent, _set_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)""",
        })

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

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_one_rate_two_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action',)

  _yang_name = 'one-rate-two-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  pir = __builtin__.property(_get_pir, _set_pir)
  pir_pct = __builtin__.property(_get_pir_pct, _set_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining, _set_pir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  be = __builtin__.property(_get_be, _set_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  pir = __builtin__.property(_get_pir)
  pir_pct = __builtin__.property(_get_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  be = __builtin__.property(_get_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the conform action of a
2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_violate_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'violate-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_two_rate_three_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data for a 2 rate, 3 color policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action','__violate_action',)

  _yang_name = 'two-rate-three-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_violate_action(self):
    """
    Getter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    return self.__violate_action
      
  def _set_violate_action(self, v, load=False):
    """
    Setter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violate_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violate_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_violate_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violate_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_violate_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_violate_action(self):
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)
  violate_action = __builtin__.property(_get_violate_action, _set_violate_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ('violate_action', violate_action), ])


class yc_scheduler_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined QoS traffic schedulers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__config','__state','__inputs','__output','__one_rate_two_color','__two_rate_three_color',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the list key
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the list key
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)

    YANG Description: Configuration data for QoS schedulers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state data for QoS schedulers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_inputs(self):
    """
    Getter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)

    YANG Description: Enclosing container 
    """
    return self.__inputs
      
  def _set_inputs(self, v, load=False):
    """
    Setter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inputs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inputs() directly.

    YANG Description: Enclosing container 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inputs_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inputs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inputs_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_inputs(self):
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)

    YANG Description: Top-level container for scheduler output data
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for scheduler output data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_one_rate_two_color(self):
    """
    Getter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    return self.__one_rate_two_color
      
  def _set_one_rate_two_color(self, v, load=False):
    """
    Setter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_one_rate_two_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_one_rate_two_color() directly.

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_one_rate_two_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """one_rate_two_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_one_rate_two_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_one_rate_two_color(self):
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_two_rate_three_color(self):
    """
    Getter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    return self.__two_rate_three_color
      
  def _set_two_rate_three_color(self, v, load=False):
    """
    Setter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_two_rate_three_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_two_rate_three_color() directly.

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_two_rate_three_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """two_rate_three_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_two_rate_three_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_two_rate_three_color(self):
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  inputs = __builtin__.property(_get_inputs, _set_inputs)
  output = __builtin__.property(_get_output, _set_output)
  one_rate_two_color = __builtin__.property(_get_one_rate_two_color, _set_one_rate_two_color)
  two_rate_three_color = __builtin__.property(_get_two_rate_three_color, _set_two_rate_three_color)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('config', config), ('state', state), ('inputs', inputs), ('output', output), ('one_rate_two_color', one_rate_two_color), ('two_rate_three_color', two_rate_three_color), ])


class yc_schedulers_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of defined QoS traffic schedulers.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of defined QoS traffic schedulers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler = __builtin__.property(_get_scheduler, _set_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos__qos_scheduler_policies_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)

    YANG Description: Reference to the name of the scheduler policy
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the scheduler policy
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the scheduler policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_scheduler_policies_openconfig_qos__qos_scheduler_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/scheduler-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of configured scheduler policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler_policy',)

  _yang_name = 'scheduler-policies'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies']

  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_scheduler_policy_openconfig_qos__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('scheduler_policy', scheduler_policy), ])


class yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)""",
        })

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

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer, _set_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer, _set_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type, _set_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit, _set_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor, _set_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)""",
        })

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

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)

  name = __builtin__.property(_get_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_queue_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Buffer allocation profile for a specific queue on the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_buffer_allocation_profile_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'buffer-allocation-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_buffer_allocation_profiles_openconfig_qos__qos_buffer_allocation_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/buffer-allocation-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for buffer allocation profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile',)

  _yang_name = 'buffer-allocation-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ])


class yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)
  weight = __builtin__.property(_get_weight, _set_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent, _set_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)
  weight = __builtin__.property(_get_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)

    YANG Description: Configuration parameters relating to the WRED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)

    YANG Description: Operational state parameters relating to the WRED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_wred_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/wred. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'wred'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

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

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)

    YANG Description: Configuration parameters relating to the RED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)

    YANG Description: Operational state parameters relating to the RED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_red_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile/red. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'red'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_queue_management_profile_openconfig_qos__qos_queue_management_profiles_queue_management_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles/queue-management-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__wred','__red',)

  _yang_name = 'queue-management-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__red = YANGDynClass(base=yc_red_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_wred(self):
    """
    Getter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    return self.__wred
      
  def _set_wred(self, v, load=False):
    """
    Setter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_wred is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_wred() directly.

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_wred_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """wred must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_wred_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_wred(self):
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_red(self):
    """
    Getter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    return self.__red
      
  def _set_red(self, v, load=False):
    """
    Setter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_red is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_red() directly.

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_red_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """red must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_red_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_red(self):
    self.__red = YANGDynClass(base=yc_red_openconfig_qos__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  wred = __builtin__.property(_get_wred, _set_wred)
  red = __builtin__.property(_get_red, _set_red)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('wred', wred), ('red', red), ])


class yc_queue_management_profiles_openconfig_qos__qos_queue_management_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos/queue-management-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of configured
queue management profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue_management_profile',)

  _yang_name = 'queue-management-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queue-management-profiles']

  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_management_profile_openconfig_qos__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('queue_management_profile', queue_management_profile), ])


class yc_qos_openconfig_qos__qos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /qos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data
  """
  __slots__ = ('_path_helper', '_extmethods', '__interfaces','__classifiers','__forwarding_groups','__queues','__scheduler_policies','__buffer_allocation_profiles','__queue_management_profiles',)

  _yang_name = 'qos'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos']

  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /qos/interfaces (container)

    YANG Description: Enclosing container for the list of interface references
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /qos/interfaces (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interfaces is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interfaces() directly.

    YANG Description: Enclosing container for the list of interface references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_qos__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interfaces must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interfaces_openconfig_qos__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_interfaces(self):
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/classifiers (container)

    YANG Description: Enclosing container for QoS classifiers
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Enclosing container for QoS classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_forwarding_groups(self):
    """
    Getter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)

    YANG Description: Enclosing container for list of forwarding groups
    """
    return self.__forwarding_groups
      
  def _set_forwarding_groups(self, v, load=False):
    """
    Setter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_groups() directly.

    YANG Description: Enclosing container for list of forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_groups_openconfig_qos__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_forwarding_groups(self):
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/queues (container)

    YANG Description: Enclosing container for the list of queues
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Enclosing container for the list of queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policies(self):
    """
    Getter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    return self.__scheduler_policies
      
  def _set_scheduler_policies(self, v, load=False):
    """
    Setter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policies() directly.

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policies_openconfig_qos__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_scheduler_policies(self):
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_buffer_allocation_profiles(self):
    """
    Getter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    return self.__buffer_allocation_profiles
      
  def _set_buffer_allocation_profiles(self, v, load=False):
    """
    Setter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profiles() directly.

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_buffer_allocation_profiles_openconfig_qos__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profiles(self):
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queue_management_profiles(self):
    """
    Getter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    return self.__queue_management_profiles
      
  def _set_queue_management_profiles(self, v, load=False):
    """
    Setter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profiles() directly.

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queue_management_profiles_openconfig_qos__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queue_management_profiles_openconfig_qos__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queue_management_profiles(self):
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  forwarding_groups = __builtin__.property(_get_forwarding_groups, _set_forwarding_groups)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policies = __builtin__.property(_get_scheduler_policies, _set_scheduler_policies)
  buffer_allocation_profiles = __builtin__.property(_get_buffer_allocation_profiles, _set_buffer_allocation_profiles)
  queue_management_profiles = __builtin__.property(_get_queue_management_profiles, _set_queue_management_profiles)


  _pyangbind_elements = OrderedDict([('interfaces', interfaces), ('classifiers', classifiers), ('forwarding_groups', forwarding_groups), ('queues', queues), ('scheduler_policies', scheduler_policies), ('buffer_allocation_profiles', buffer_allocation_profiles), ('queue_management_profiles', queue_management_profiles), ])


class openconfig_qos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos - based on the path /openconfig-qos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This module defines configuration and operational state data
related to network quality-of-service.
  """
  __slots__ = ('_path_helper', '_extmethods', '__qos',)

  _yang_name = 'openconfig-qos'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 []

  def _get_qos(self):
    """
    Getter method for qos, mapped from YANG variable /qos (container)

    YANG Description: Top-level container for QoS data
    """
    return self.__qos
      
  def _set_qos(self, v, load=False):
    """
    Setter method for qos, mapped from YANG variable /qos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_qos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_qos() directly.

    YANG Description: Top-level container for QoS data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_qos_openconfig_qos__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """qos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_qos_openconfig_qos__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_qos(self):
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  qos = __builtin__.property(_get_qos, _set_qos)


  _pyangbind_elements = OrderedDict([('qos', qos), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/interface-ref/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configured reference to interface / subinterface
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/interface-ref/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for interface-ref
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_interface_ref_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/interface-ref. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)

    YANG Description: Configured reference to interface / subinterface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configured reference to interface / subinterface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)

    YANG Description: Operational state for interface-ref
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state for interface-ref
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

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

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_voq_interface_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'voq-interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_virtual_output_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input/virtual-output-queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__voq_interface',)

  _yang_name = 'virtual-output-queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues']

  def _get_voq_interface(self):
    """
    Getter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    return self.__voq_interface
      
  def _set_voq_interface(self, v, load=False):
    """
    Setter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_voq_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_voq_interface() directly.

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_voq_interface_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """voq_interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_voq_interface(self):
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  voq_interface = __builtin__.property(_get_voq_interface, _set_voq_interface)


  _pyangbind_elements = OrderedDict([('voq_interface', voq_interface), ])


class yc_input_openconfig_qos_interfaces__qos_interfaces_interface_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data for the ingress
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy','__virtual_output_queues',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)

    YANG Description: Configuration data for QoS on ingress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)

    YANG Description: Operational state data for QoS on ingress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_virtual_output_queues(self):
    """
    Getter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    return self.__virtual_output_queues
      
  def _set_virtual_output_queues(self, v, load=False):
    """
    Setter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_output_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_output_queues() directly.

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_virtual_output_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_output_queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_virtual_output_queues(self):
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_interfaces__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)
  virtual_output_queues = __builtin__.property(_get_virtual_output_queues, _set_virtual_output_queues)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ('virtual_output_queues', virtual_output_queues), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

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

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

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

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

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

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

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

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_output_openconfig_qos_interfaces__qos_interfaces_interface_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data related to the egress
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)

    YANG Description: Configuration data for QoS on the egress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)

    YANG Description: Operational state data for QoS on the egress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_interfaces__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ])


class yc_interface_openconfig_qos_interfaces__qos_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__input','__output',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_interfaces__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to the interface-id list key
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Reference to the interface-id list key
    """
    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=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)

    YANG Description: Operational state data 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_ref is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_ref() directly.

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_ref must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_ref_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_interfaces__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_input_openconfig_qos_interfaces__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_input_openconfig_qos_interfaces__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_interfaces__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_interfaces__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  input = __builtin__.property(_get_input, _set_input)
  output = __builtin__.property(_get_output, _set_output)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('input', input), ('output', output), ])


class yc_interfaces_openconfig_qos_interfaces__qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_interfaces__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface (list)

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_qos_interfaces__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_interfaces__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_interfaces__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for classifers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for list of match criteria in a QoS
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  id = __builtin__.property(_get_id, _set_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for list of match criteria in a
QoS classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'config']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

  source_mac = __builtin__.property(_get_source_mac, _set_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask, _set_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac, _set_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask, _set_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype, _set_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State Information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'state']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)

  source_mac = __builtin__.property(_get_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_l2_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/l2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Ethernet header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'l2'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)

    YANG Description: State Information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State Information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)

    YANG Description: State attributes for ICMPv4 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for IPv4 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv4',)

  _yang_name = 'ipv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)

    YANG Description: Configuration data for IPv4 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)

    YANG Description: State information for IPv4 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State information for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv4(self):
    """
    Getter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)

    YANG Description: Top container for ICMPv4 filtering
    """
    return self.__icmpv4
      
  def _set_icmpv4(self, v, load=False):
    """
    Setter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv4() directly.

    YANG Description: Top container for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv4(self):
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv4 = __builtin__.property(_get_icmpv4, _set_icmpv4)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv4', icmpv4), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label, _set_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label, _set_destination_flow_label)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)

    YANG Description: State attributes for ICMPv6 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for IPv6 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv6',)

  _yang_name = 'ipv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)

    YANG Description: Configuration data for IPv6 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)

    YANG Description: Operational state data for IPv6 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv6(self):
    """
    Getter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)

    YANG Description: Top container for ICMPv6 filtering
    """
    return self.__icmpv6
      
  def _set_icmpv6(self, v, load=False):
    """
    Setter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv6() directly.

    YANG Description: Top container for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv6(self):
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv6 = __builtin__.property(_get_icmpv6, _set_icmpv6)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv6', icmpv6), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'config']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  source_port = __builtin__.property(_get_source_port, _set_source_port)
  source_port_set = __builtin__.property(_get_source_port_set, _set_source_port_set)
  destination_port = __builtin__.property(_get_destination_port, _set_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set, _set_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode, _set_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode, _set_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags, _set_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail, _set_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'state']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  source_port = __builtin__.property(_get_source_port)
  source_port_set = __builtin__.property(_get_source_port_set)
  destination_port = __builtin__.property(_get_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_transport_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport fields container
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)

    YANG Description: State data
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to fields within
the MPLS header.
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'config']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  traffic_class = __builtin__.property(_get_traffic_class, _set_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value, _set_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value, _set_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value, _set_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to fields
within the MPLS header
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'state']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  traffic_class = __builtin__.property(_get_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_mpls_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_conditions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/conditions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__l2','__ipv4','__ipv6','__transport','__mpls',)

  _yang_name = 'conditions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions']

  def _get_l2(self):
    """
    Getter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)

    YANG Description: Ethernet header fields
    """
    return self.__l2
      
  def _set_l2(self, v, load=False):
    """
    Setter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2() directly.

    YANG Description: Ethernet header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__l2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2(self):
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv4(self):
    """
    Getter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)

    YANG Description: Top level container for IPv4 match field data
    """
    return self.__ipv4
      
  def _set_ipv4(self, v, load=False):
    """
    Setter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4() directly.

    YANG Description: Top level container for IPv4 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4(self):
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv6(self):
    """
    Getter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)

    YANG Description: Top-level container for IPv6 match field data
    """
    return self.__ipv6
      
  def _set_ipv6(self, v, load=False):
    """
    Setter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6() directly.

    YANG Description: Top-level container for IPv6 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6(self):
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)

    YANG Description: Transport fields container
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transport is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transport() directly.

    YANG Description: Transport fields container
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transport must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transport_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__transport = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transport(self):
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)

    YANG Description: MPLS header fields
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls() directly.

    YANG Description: MPLS header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__mpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls(self):
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  l2 = __builtin__.property(_get_l2, _set_l2)
  ipv4 = __builtin__.property(_get_ipv4, _set_ipv4)
  ipv6 = __builtin__.property(_get_ipv6, _set_ipv6)
  transport = __builtin__.property(_get_transport, _set_transport)
  mpls = __builtin__.property(_get_mpls, _set_mpls)


  _pyangbind_elements = OrderedDict([('l2', l2), ('ipv4', ipv4), ('ipv6', ipv6), ('transport', transport), ('mpls', mpls), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied to packets that match the classifier
term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'config']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  target_group = __builtin__.property(_get_target_group, _set_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters associated with classifier term
actions
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'state']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  target_group = __builtin__.property(_get_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions/remark/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions/remark/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_remark_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions/remark. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remark'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)

    YANG Description: Configuration parameters relating to remarking packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)

    YANG Description: Operational state parameters relating to remarking packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_actions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term/actions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied for packets matching the specified
classification rules.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__remark',)

  _yang_name = 'actions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_remark(self):
    """
    Getter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    return self.__remark
      
  def _set_remark(self, v, load=False):
    """
    Setter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remark() directly.

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remark_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remark must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remark_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__remark = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remark(self):
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  remark = __builtin__.property(_get_remark, _set_remark)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('remark', remark), ])


class yc_term_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms used in the classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state','__conditions','__actions',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to id list key.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to id list key.
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conditions(self):
    """
    Getter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    return self.__conditions
      
  def _set_conditions(self, v, load=False):
    """
    Setter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conditions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conditions() directly.

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conditions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conditions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conditions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conditions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conditions(self):
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_actions(self):
    """
    Getter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    return self.__actions
      
  def _set_actions(self, v, load=False):
    """
    Setter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_actions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_actions() directly.

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_actions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """actions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_actions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__actions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_actions(self):
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conditions = __builtin__.property(_get_conditions, _set_conditions)
  actions = __builtin__.property(_get_actions, _set_actions)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ('conditions', conditions), ('actions', actions), ])


class yc_terms_openconfig_qos_interfaces__qos_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for ths list of terms
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms used in the classifier
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms used in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_interfaces__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_interfaces__qos_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of classifier elements
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)

    YANG Description: Reference to list key name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to list key name
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)

    YANG Description: Configuration data for classifers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for classifers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)

    YANG Description: Operational state data for classifiers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for ths list of terms
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for ths list of terms
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_interfaces__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_interfaces__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_interfaces__qos_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for QoS classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_interfaces__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)

    YANG Description: List of classifier elements
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: List of classifier elements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_classifier_openconfig_qos_interfaces__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_interfaces__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_interfaces__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/forwarding-groups/forwarding-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  fabric_priority = __builtin__.property(_get_fabric_priority, _set_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue, _set_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue, _set_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue, _set_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_state_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/forwarding-groups/forwarding-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'forwarding-groups', 'forwarding-group', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  fabric_priority = __builtin__.property(_get_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_forwarding_group_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/forwarding-groups/forwarding-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'forwarding-group'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)

    YANG Description: Reference to name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to name list key
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)

    YANG Description: Configuration data for forwarding groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)

    YANG Description: Operational state data for forwarding groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/forwarding-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_group',)

  _yang_name = 'forwarding-groups'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'forwarding-groups']

  def _get_forwarding_group(self):
    """
    Getter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    return self.__forwarding_group
      
  def _set_forwarding_group(self, v, load=False):
    """
    Setter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_group() directly.

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_forwarding_group_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__forwarding_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_group(self):
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_interfaces__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  forwarding_group = __builtin__.property(_get_forwarding_group, _set_forwarding_group)


  _pyangbind_elements = OrderedDict([('forwarding_group', forwarding_group), ])


class yc_config_openconfig_qos_interfaces__qos_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_id = __builtin__.property(_get_queue_id, _set_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_state_openconfig_qos_interfaces__qos_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  name = __builtin__.property(_get_name)
  queue_id = __builtin__.property(_get_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_queue_openconfig_qos_interfaces__qos_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)

    YANG Description: Reference to the queue name list key.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue name list key.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queues/queue/config (container)

    YANG Description: Configuration data for queues
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queues/queue/state (container)

    YANG Description: Operational state data for queues
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_interfaces__qos_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/queues/queue (list)

    YANG Description: List of defined queues
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: List of defined queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'config']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  type = __builtin__.property(_get_type, _set_type)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  type = __builtin__.property(_get_type)
  priority = __builtin__.property(_get_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  input_type = __builtin__.property(_get_input_type, _set_input_type)
  queue = __builtin__.property(_get_queue, _set_queue)
  weight = __builtin__.property(_get_weight, _set_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)

  id = __builtin__.property(_get_id)
  input_type = __builtin__.property(_get_input_type)
  queue = __builtin__.property(_get_queue)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of input sources for the scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)

    YANG Description: Reference to list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)

    YANG Description: Configuration data for scheduler input sources
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)

    YANG Description: Operational state data for scheduler input sources
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ])


class yc_inputs_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container 
  """
  __slots__ = ('_path_helper', '_extmethods', '__input',)

  _yang_name = 'inputs'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs']

  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)

    YANG Description: List of input sources for the scheduler.
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: List of input sources for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  input = __builtin__.property(_get_input, _set_input)


  _pyangbind_elements = OrderedDict([('input', input), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'config']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  output_type = __builtin__.property(_get_output_type, _set_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler, _set_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group, _set_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'state']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  output_type = __builtin__.property(_get_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_output_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for scheduler output data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)

    YANG Description: Configuration data for scheduler output
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)

    YANG Description: Operational state data for scheduler output
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior, _set_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes, _set_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets, _set_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent, _set_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_one_rate_two_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action',)

  _yang_name = 'one-rate-two-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  pir = __builtin__.property(_get_pir, _set_pir)
  pir_pct = __builtin__.property(_get_pir_pct, _set_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining, _set_pir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  be = __builtin__.property(_get_be, _set_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  pir = __builtin__.property(_get_pir)
  pir_pct = __builtin__.property(_get_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  be = __builtin__.property(_get_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the conform action of a
2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_violate_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'violate-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_two_rate_three_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data for a 2 rate, 3 color policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action','__violate_action',)

  _yang_name = 'two-rate-three-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_violate_action(self):
    """
    Getter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    return self.__violate_action
      
  def _set_violate_action(self, v, load=False):
    """
    Setter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violate_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violate_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_violate_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violate_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_violate_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__violate_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violate_action(self):
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)
  violate_action = __builtin__.property(_get_violate_action, _set_violate_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ('violate_action', violate_action), ])


class yc_scheduler_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined QoS traffic schedulers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__config','__state','__inputs','__output','__one_rate_two_color','__two_rate_three_color',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the list key
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the list key
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)

    YANG Description: Configuration data for QoS schedulers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state data for QoS schedulers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_inputs(self):
    """
    Getter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)

    YANG Description: Enclosing container 
    """
    return self.__inputs
      
  def _set_inputs(self, v, load=False):
    """
    Setter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inputs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inputs() directly.

    YANG Description: Enclosing container 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inputs_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inputs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inputs_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__inputs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inputs(self):
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)

    YANG Description: Top-level container for scheduler output data
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for scheduler output data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_one_rate_two_color(self):
    """
    Getter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    return self.__one_rate_two_color
      
  def _set_one_rate_two_color(self, v, load=False):
    """
    Setter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_one_rate_two_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_one_rate_two_color() directly.

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_one_rate_two_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """one_rate_two_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__one_rate_two_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_one_rate_two_color(self):
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_two_rate_three_color(self):
    """
    Getter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    return self.__two_rate_three_color
      
  def _set_two_rate_three_color(self, v, load=False):
    """
    Setter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_two_rate_three_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_two_rate_three_color() directly.

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_two_rate_three_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """two_rate_three_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__two_rate_three_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_two_rate_three_color(self):
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  inputs = __builtin__.property(_get_inputs, _set_inputs)
  output = __builtin__.property(_get_output, _set_output)
  one_rate_two_color = __builtin__.property(_get_one_rate_two_color, _set_one_rate_two_color)
  two_rate_three_color = __builtin__.property(_get_two_rate_three_color, _set_two_rate_three_color)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('config', config), ('state', state), ('inputs', inputs), ('output', output), ('one_rate_two_color', one_rate_two_color), ('two_rate_three_color', two_rate_three_color), ])


class yc_schedulers_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of defined QoS traffic schedulers.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of defined QoS traffic schedulers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler = __builtin__.property(_get_scheduler, _set_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)

    YANG Description: Reference to the name of the scheduler policy
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the scheduler policy
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the scheduler policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_scheduler_policies_openconfig_qos_interfaces__qos_scheduler_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/scheduler-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of configured scheduler policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler_policy',)

  _yang_name = 'scheduler-policies'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies']

  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_interfaces__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('scheduler_policy', scheduler_policy), ])


class yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer, _set_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer, _set_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type, _set_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit, _set_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor, _set_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)

  name = __builtin__.property(_get_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_queue_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Buffer allocation profile for a specific queue on the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_buffer_allocation_profile_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'buffer-allocation-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_buffer_allocation_profiles_openconfig_qos_interfaces__qos_buffer_allocation_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/buffer-allocation-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for buffer allocation profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile',)

  _yang_name = 'buffer-allocation-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_interfaces__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ])


class yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)
  weight = __builtin__.property(_get_weight, _set_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent, _set_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)
  weight = __builtin__.property(_get_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)

    YANG Description: Configuration parameters relating to the WRED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)

    YANG Description: Operational state parameters relating to the WRED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_wred_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/wred. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'wred'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)

    YANG Description: Configuration parameters relating to the RED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)

    YANG Description: Operational state parameters relating to the RED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_red_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile/red. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'red'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_queue_management_profile_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles/queue-management-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__wred','__red',)

  _yang_name = 'queue-management-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_wred(self):
    """
    Getter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    return self.__wred
      
  def _set_wred(self, v, load=False):
    """
    Setter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_wred is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_wred() directly.

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_wred_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """wred must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_wred_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__wred = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_wred(self):
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_red(self):
    """
    Getter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    return self.__red
      
  def _set_red(self, v, load=False):
    """
    Setter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_red is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_red() directly.

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_red_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """red must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_red_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__red = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_red(self):
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  wred = __builtin__.property(_get_wred, _set_wred)
  red = __builtin__.property(_get_red, _set_red)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('wred', wred), ('red', red), ])


class yc_queue_management_profiles_openconfig_qos_interfaces__qos_queue_management_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos/queue-management-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of configured
queue management profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue_management_profile',)

  _yang_name = 'queue-management-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queue-management-profiles']

  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_management_profile_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_interfaces__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('queue_management_profile', queue_management_profile), ])


class yc_qos_openconfig_qos_interfaces__qos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /qos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data
  """
  __slots__ = ('_path_helper', '_extmethods', '__interfaces','__classifiers','__forwarding_groups','__queues','__scheduler_policies','__buffer_allocation_profiles','__queue_management_profiles',)

  _yang_name = 'qos'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_interfaces__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_interfaces__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_interfaces__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_interfaces__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos']

  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /qos/interfaces (container)

    YANG Description: Enclosing container for the list of interface references
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /qos/interfaces (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interfaces is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interfaces() directly.

    YANG Description: Enclosing container for the list of interface references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_qos_interfaces__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interfaces must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interfaces_openconfig_qos_interfaces__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interfaces = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interfaces(self):
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_interfaces__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/classifiers (container)

    YANG Description: Enclosing container for QoS classifiers
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Enclosing container for QoS classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_interfaces__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_interfaces__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_forwarding_groups(self):
    """
    Getter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)

    YANG Description: Enclosing container for list of forwarding groups
    """
    return self.__forwarding_groups
      
  def _set_forwarding_groups(self, v, load=False):
    """
    Setter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_groups() directly.

    YANG Description: Enclosing container for list of forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__forwarding_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_groups(self):
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_interfaces__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/queues (container)

    YANG Description: Enclosing container for the list of queues
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Enclosing container for the list of queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_interfaces__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_interfaces__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policies(self):
    """
    Getter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    return self.__scheduler_policies
      
  def _set_scheduler_policies(self, v, load=False):
    """
    Setter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policies() directly.

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos_interfaces__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policies_openconfig_qos_interfaces__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policies(self):
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_interfaces__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_buffer_allocation_profiles(self):
    """
    Getter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    return self.__buffer_allocation_profiles
      
  def _set_buffer_allocation_profiles(self, v, load=False):
    """
    Setter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profiles() directly.

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_buffer_allocation_profiles_openconfig_qos_interfaces__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_interfaces__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__buffer_allocation_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profiles(self):
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_interfaces__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queue_management_profiles(self):
    """
    Getter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    return self.__queue_management_profiles
      
  def _set_queue_management_profiles(self, v, load=False):
    """
    Setter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profiles() directly.

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queue_management_profiles_openconfig_qos_interfaces__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_interfaces__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queue_management_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profiles(self):
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_interfaces__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  forwarding_groups = __builtin__.property(_get_forwarding_groups, _set_forwarding_groups)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policies = __builtin__.property(_get_scheduler_policies, _set_scheduler_policies)
  buffer_allocation_profiles = __builtin__.property(_get_buffer_allocation_profiles, _set_buffer_allocation_profiles)
  queue_management_profiles = __builtin__.property(_get_queue_management_profiles, _set_queue_management_profiles)


  _pyangbind_elements = OrderedDict([('interfaces', interfaces), ('classifiers', classifiers), ('forwarding_groups', forwarding_groups), ('queues', queues), ('scheduler_policies', scheduler_policies), ('buffer_allocation_profiles', buffer_allocation_profiles), ('queue_management_profiles', queue_management_profiles), ])


class openconfig_qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-interfaces - based on the path /openconfig-qos-interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines data related to quality-of-service
configuration and operational state associated with
interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__qos',)

  _yang_name = 'openconfig-qos-interfaces'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_interfaces__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 []

  def _get_qos(self):
    """
    Getter method for qos, mapped from YANG variable /qos (container)

    YANG Description: Top-level container for QoS data
    """
    return self.__qos
      
  def _set_qos(self, v, load=False):
    """
    Setter method for qos, mapped from YANG variable /qos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_qos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_qos() directly.

    YANG Description: Top-level container for QoS data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_qos_openconfig_qos_interfaces__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """qos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_qos_openconfig_qos_interfaces__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__qos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_qos(self):
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_interfaces__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  qos = __builtin__.property(_get_qos, _set_qos)


  _pyangbind_elements = OrderedDict([('qos', qos), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/interface-ref/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configured reference to interface / subinterface
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__subinterface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/interface-ref/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for interface-ref
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__subinterface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_interface_ref_openconfig_qos_elements__qos_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/interface-ref. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)

    YANG Description: Configured reference to interface / subinterface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configured reference to interface / subinterface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)

    YANG Description: Operational state for interface-ref
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state for interface-ref
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_input_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_voq_interface_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'voq-interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_virtual_output_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input/virtual-output-queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__voq_interface',)

  _yang_name = 'virtual-output-queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues']

  def _get_voq_interface(self):
    """
    Getter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    return self.__voq_interface
      
  def _set_voq_interface(self, v, load=False):
    """
    Setter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_voq_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_voq_interface() directly.

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_voq_interface_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """voq_interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__voq_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_voq_interface(self):
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  voq_interface = __builtin__.property(_get_voq_interface, _set_voq_interface)


  _pyangbind_elements = OrderedDict([('voq_interface', voq_interface), ])


class yc_input_openconfig_qos_elements__qos_interfaces_interface_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data for the ingress
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy','__virtual_output_queues',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)

    YANG Description: Configuration data for QoS on ingress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)

    YANG Description: Operational state data for QoS on ingress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_virtual_output_queues(self):
    """
    Getter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    return self.__virtual_output_queues
      
  def _set_virtual_output_queues(self, v, load=False):
    """
    Setter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_output_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_output_queues() directly.

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_virtual_output_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_output_queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__virtual_output_queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_output_queues(self):
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_elements__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)
  virtual_output_queues = __builtin__.property(_get_virtual_output_queues, _set_virtual_output_queues)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ('virtual_output_queues', virtual_output_queues), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_output_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_elements__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_elements__qos_interfaces_interface_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_output_openconfig_qos_elements__qos_interfaces_interface_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data related to the egress
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)

    YANG Description: Configuration data for QoS on the egress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)

    YANG Description: Operational state data for QoS on the egress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_elements__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ])


class yc_interface_openconfig_qos_elements__qos_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__input','__output',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_elements__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_elements__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_elements__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to the interface-id list key
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Reference to the interface-id list key
    """
    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=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)

    YANG Description: Operational state data 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_ref is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_ref() directly.

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_qos_elements__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_ref must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_ref_openconfig_qos_elements__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_elements__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_input_openconfig_qos_elements__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_input_openconfig_qos_elements__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_elements__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_elements__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_elements__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_elements__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  input = __builtin__.property(_get_input, _set_input)
  output = __builtin__.property(_get_output, _set_output)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('input', input), ('output', output), ])


class yc_interfaces_openconfig_qos_elements__qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_elements__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface (list)

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_qos_elements__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_elements__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_elements__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for classifers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for list of match criteria in a QoS
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  id = __builtin__.property(_get_id, _set_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for list of match criteria in a
QoS classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'config']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

  source_mac = __builtin__.property(_get_source_mac, _set_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask, _set_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac, _set_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask, _set_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype, _set_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State Information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'state']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)

  source_mac = __builtin__.property(_get_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_l2_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/l2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Ethernet header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'l2'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)

    YANG Description: State Information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State Information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)

    YANG Description: State attributes for ICMPv4 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for IPv4 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv4',)

  _yang_name = 'ipv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)

    YANG Description: Configuration data for IPv4 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)

    YANG Description: State information for IPv4 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State information for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv4(self):
    """
    Getter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)

    YANG Description: Top container for ICMPv4 filtering
    """
    return self.__icmpv4
      
  def _set_icmpv4(self, v, load=False):
    """
    Setter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv4() directly.

    YANG Description: Top container for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv4(self):
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv4 = __builtin__.property(_get_icmpv4, _set_icmpv4)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv4', icmpv4), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label, _set_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label, _set_destination_flow_label)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)

    YANG Description: State attributes for ICMPv6 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for IPv6 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv6',)

  _yang_name = 'ipv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)

    YANG Description: Configuration data for IPv6 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)

    YANG Description: Operational state data for IPv6 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv6(self):
    """
    Getter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)

    YANG Description: Top container for ICMPv6 filtering
    """
    return self.__icmpv6
      
  def _set_icmpv6(self, v, load=False):
    """
    Setter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv6() directly.

    YANG Description: Top container for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv6(self):
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv6 = __builtin__.property(_get_icmpv6, _set_icmpv6)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv6', icmpv6), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'config']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  source_port = __builtin__.property(_get_source_port, _set_source_port)
  source_port_set = __builtin__.property(_get_source_port_set, _set_source_port_set)
  destination_port = __builtin__.property(_get_destination_port, _set_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set, _set_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode, _set_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode, _set_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags, _set_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail, _set_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'state']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  source_port = __builtin__.property(_get_source_port)
  source_port_set = __builtin__.property(_get_source_port_set)
  destination_port = __builtin__.property(_get_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_transport_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport fields container
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)

    YANG Description: State data
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to fields within
the MPLS header.
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'config']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  traffic_class = __builtin__.property(_get_traffic_class, _set_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value, _set_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value, _set_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value, _set_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to fields
within the MPLS header
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'state']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  traffic_class = __builtin__.property(_get_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_mpls_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_conditions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/conditions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__l2','__ipv4','__ipv6','__transport','__mpls',)

  _yang_name = 'conditions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions']

  def _get_l2(self):
    """
    Getter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)

    YANG Description: Ethernet header fields
    """
    return self.__l2
      
  def _set_l2(self, v, load=False):
    """
    Setter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2() directly.

    YANG Description: Ethernet header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__l2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2(self):
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv4(self):
    """
    Getter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)

    YANG Description: Top level container for IPv4 match field data
    """
    return self.__ipv4
      
  def _set_ipv4(self, v, load=False):
    """
    Setter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4() directly.

    YANG Description: Top level container for IPv4 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4(self):
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv6(self):
    """
    Getter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)

    YANG Description: Top-level container for IPv6 match field data
    """
    return self.__ipv6
      
  def _set_ipv6(self, v, load=False):
    """
    Setter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6() directly.

    YANG Description: Top-level container for IPv6 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6(self):
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)

    YANG Description: Transport fields container
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transport is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transport() directly.

    YANG Description: Transport fields container
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transport must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transport_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__transport = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transport(self):
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)

    YANG Description: MPLS header fields
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls() directly.

    YANG Description: MPLS header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__mpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls(self):
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  l2 = __builtin__.property(_get_l2, _set_l2)
  ipv4 = __builtin__.property(_get_ipv4, _set_ipv4)
  ipv6 = __builtin__.property(_get_ipv6, _set_ipv6)
  transport = __builtin__.property(_get_transport, _set_transport)
  mpls = __builtin__.property(_get_mpls, _set_mpls)


  _pyangbind_elements = OrderedDict([('l2', l2), ('ipv4', ipv4), ('ipv6', ipv6), ('transport', transport), ('mpls', mpls), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied to packets that match the classifier
term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'config']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  target_group = __builtin__.property(_get_target_group, _set_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters associated with classifier term
actions
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'state']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  target_group = __builtin__.property(_get_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions/remark/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions/remark/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_remark_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions/remark. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remark'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)

    YANG Description: Configuration parameters relating to remarking packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)

    YANG Description: Operational state parameters relating to remarking packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_actions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term/actions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied for packets matching the specified
classification rules.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__remark',)

  _yang_name = 'actions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_remark(self):
    """
    Getter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    return self.__remark
      
  def _set_remark(self, v, load=False):
    """
    Setter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remark() directly.

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remark_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remark must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remark_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__remark = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remark(self):
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  remark = __builtin__.property(_get_remark, _set_remark)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('remark', remark), ])


class yc_term_openconfig_qos_elements__qos_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms used in the classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state','__conditions','__actions',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to id list key.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to id list key.
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conditions(self):
    """
    Getter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    return self.__conditions
      
  def _set_conditions(self, v, load=False):
    """
    Setter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conditions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conditions() directly.

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conditions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conditions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conditions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conditions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conditions(self):
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_actions(self):
    """
    Getter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    return self.__actions
      
  def _set_actions(self, v, load=False):
    """
    Setter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_actions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_actions() directly.

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_actions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """actions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_actions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__actions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_actions(self):
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_elements__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conditions = __builtin__.property(_get_conditions, _set_conditions)
  actions = __builtin__.property(_get_actions, _set_actions)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ('conditions', conditions), ('actions', actions), ])


class yc_terms_openconfig_qos_elements__qos_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for ths list of terms
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms used in the classifier
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms used in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_elements__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_elements__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_elements__qos_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of classifier elements
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)

    YANG Description: Reference to list key name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to list key name
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)

    YANG Description: Configuration data for classifers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for classifers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)

    YANG Description: Operational state data for classifiers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for ths list of terms
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for ths list of terms
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_elements__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_elements__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_elements__qos_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for QoS classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_elements__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)

    YANG Description: List of classifier elements
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: List of classifier elements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_classifier_openconfig_qos_elements__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_elements__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_elements__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/forwarding-groups/forwarding-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  fabric_priority = __builtin__.property(_get_fabric_priority, _set_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue, _set_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue, _set_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue, _set_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_state_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/forwarding-groups/forwarding-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'forwarding-groups', 'forwarding-group', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  fabric_priority = __builtin__.property(_get_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_forwarding_group_openconfig_qos_elements__qos_forwarding_groups_forwarding_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/forwarding-groups/forwarding-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'forwarding-group'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)

    YANG Description: Reference to name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to name list key
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)

    YANG Description: Configuration data for forwarding groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)

    YANG Description: Operational state data for forwarding groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/forwarding-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_group',)

  _yang_name = 'forwarding-groups'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_elements__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'forwarding-groups']

  def _get_forwarding_group(self):
    """
    Getter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    return self.__forwarding_group
      
  def _set_forwarding_group(self, v, load=False):
    """
    Setter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_group() directly.

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_forwarding_group_openconfig_qos_elements__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_elements__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__forwarding_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_group(self):
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_elements__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  forwarding_group = __builtin__.property(_get_forwarding_group, _set_forwarding_group)


  _pyangbind_elements = OrderedDict([('forwarding_group', forwarding_group), ])


class yc_config_openconfig_qos_elements__qos_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_id = __builtin__.property(_get_queue_id, _set_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_state_openconfig_qos_elements__qos_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  name = __builtin__.property(_get_name)
  queue_id = __builtin__.property(_get_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_queue_openconfig_qos_elements__qos_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)

    YANG Description: Reference to the queue name list key.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue name list key.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queues/queue/config (container)

    YANG Description: Configuration data for queues
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queues/queue/state (container)

    YANG Description: Operational state data for queues
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_elements__qos_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/queues/queue (list)

    YANG Description: List of defined queues
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: List of defined queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'config']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  type = __builtin__.property(_get_type, _set_type)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  type = __builtin__.property(_get_type)
  priority = __builtin__.property(_get_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  input_type = __builtin__.property(_get_input_type, _set_input_type)
  queue = __builtin__.property(_get_queue, _set_queue)
  weight = __builtin__.property(_get_weight, _set_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)

  id = __builtin__.property(_get_id)
  input_type = __builtin__.property(_get_input_type)
  queue = __builtin__.property(_get_queue)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_input_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of input sources for the scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)

    YANG Description: Reference to list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)

    YANG Description: Configuration data for scheduler input sources
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)

    YANG Description: Operational state data for scheduler input sources
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ])


class yc_inputs_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container 
  """
  __slots__ = ('_path_helper', '_extmethods', '__input',)

  _yang_name = 'inputs'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs']

  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)

    YANG Description: List of input sources for the scheduler.
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: List of input sources for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_input_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  input = __builtin__.property(_get_input, _set_input)


  _pyangbind_elements = OrderedDict([('input', input), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'config']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  output_type = __builtin__.property(_get_output_type, _set_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler, _set_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group, _set_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'state']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  output_type = __builtin__.property(_get_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for scheduler output data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)

    YANG Description: Configuration data for scheduler output
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)

    YANG Description: Operational state data for scheduler output
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior, _set_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes, _set_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets, _set_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent, _set_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_one_rate_two_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action',)

  _yang_name = 'one-rate-two-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  pir = __builtin__.property(_get_pir, _set_pir)
  pir_pct = __builtin__.property(_get_pir_pct, _set_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining, _set_pir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  be = __builtin__.property(_get_be, _set_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  pir = __builtin__.property(_get_pir)
  pir_pct = __builtin__.property(_get_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  be = __builtin__.property(_get_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the conform action of a
2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_violate_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'violate-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_two_rate_three_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data for a 2 rate, 3 color policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action','__violate_action',)

  _yang_name = 'two-rate-three-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_violate_action(self):
    """
    Getter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    return self.__violate_action
      
  def _set_violate_action(self, v, load=False):
    """
    Setter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violate_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violate_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_violate_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violate_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_violate_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__violate_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violate_action(self):
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)
  violate_action = __builtin__.property(_get_violate_action, _set_violate_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ('violate_action', violate_action), ])


class yc_scheduler_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined QoS traffic schedulers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__config','__state','__inputs','__output','__one_rate_two_color','__two_rate_three_color',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the list key
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the list key
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)

    YANG Description: Configuration data for QoS schedulers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state data for QoS schedulers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_inputs(self):
    """
    Getter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)

    YANG Description: Enclosing container 
    """
    return self.__inputs
      
  def _set_inputs(self, v, load=False):
    """
    Setter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inputs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inputs() directly.

    YANG Description: Enclosing container 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inputs_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inputs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inputs_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__inputs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inputs(self):
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)

    YANG Description: Top-level container for scheduler output data
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for scheduler output data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_one_rate_two_color(self):
    """
    Getter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    return self.__one_rate_two_color
      
  def _set_one_rate_two_color(self, v, load=False):
    """
    Setter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_one_rate_two_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_one_rate_two_color() directly.

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_one_rate_two_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """one_rate_two_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__one_rate_two_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_one_rate_two_color(self):
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_two_rate_three_color(self):
    """
    Getter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    return self.__two_rate_three_color
      
  def _set_two_rate_three_color(self, v, load=False):
    """
    Setter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_two_rate_three_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_two_rate_three_color() directly.

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_two_rate_three_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """two_rate_three_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__two_rate_three_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_two_rate_three_color(self):
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  inputs = __builtin__.property(_get_inputs, _set_inputs)
  output = __builtin__.property(_get_output, _set_output)
  one_rate_two_color = __builtin__.property(_get_one_rate_two_color, _set_one_rate_two_color)
  two_rate_three_color = __builtin__.property(_get_two_rate_three_color, _set_two_rate_three_color)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('config', config), ('state', state), ('inputs', inputs), ('output', output), ('one_rate_two_color', one_rate_two_color), ('two_rate_three_color', two_rate_three_color), ])


class yc_schedulers_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of defined QoS traffic schedulers.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of defined QoS traffic schedulers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler = __builtin__.property(_get_scheduler, _set_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)

    YANG Description: Reference to the name of the scheduler policy
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the scheduler policy
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the scheduler policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/scheduler-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of configured scheduler policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler_policy',)

  _yang_name = 'scheduler-policies'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies']

  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_elements__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('scheduler_policy', scheduler_policy), ])


class yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer, _set_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer, _set_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type, _set_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit, _set_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor, _set_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)

  name = __builtin__.property(_get_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_queue_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Buffer allocation profile for a specific queue on the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_buffer_allocation_profile_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'buffer-allocation-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_buffer_allocation_profiles_openconfig_qos_elements__qos_buffer_allocation_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/buffer-allocation-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for buffer allocation profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile',)

  _yang_name = 'buffer-allocation-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_elements__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ])


class yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)
  weight = __builtin__.property(_get_weight, _set_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent, _set_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)
  weight = __builtin__.property(_get_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)

    YANG Description: Configuration parameters relating to the WRED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)

    YANG Description: Operational state parameters relating to the WRED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_wred_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/wred. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'wred'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)

    YANG Description: Configuration parameters relating to the RED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)

    YANG Description: Operational state parameters relating to the RED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_red_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile/red. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'red'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_queue_management_profile_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles/queue-management-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__wred','__red',)

  _yang_name = 'queue-management-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_wred(self):
    """
    Getter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    return self.__wred
      
  def _set_wred(self, v, load=False):
    """
    Setter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_wred is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_wred() directly.

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_wred_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """wred must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_wred_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__wred = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_wred(self):
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_red(self):
    """
    Getter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    return self.__red
      
  def _set_red(self, v, load=False):
    """
    Setter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_red is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_red() directly.

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_red_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """red must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_red_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__red = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_red(self):
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  wred = __builtin__.property(_get_wred, _set_wred)
  red = __builtin__.property(_get_red, _set_red)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('wred', wred), ('red', red), ])


class yc_queue_management_profiles_openconfig_qos_elements__qos_queue_management_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos/queue-management-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of configured
queue management profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue_management_profile',)

  _yang_name = 'queue-management-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queue-management-profiles']

  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_management_profile_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_elements__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('queue_management_profile', queue_management_profile), ])


class yc_qos_openconfig_qos_elements__qos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /qos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data
  """
  __slots__ = ('_path_helper', '_extmethods', '__interfaces','__classifiers','__forwarding_groups','__queues','__scheduler_policies','__buffer_allocation_profiles','__queue_management_profiles',)

  _yang_name = 'qos'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_elements__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_elements__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_elements__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos']

  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /qos/interfaces (container)

    YANG Description: Enclosing container for the list of interface references
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /qos/interfaces (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interfaces is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interfaces() directly.

    YANG Description: Enclosing container for the list of interface references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_qos_elements__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interfaces must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interfaces_openconfig_qos_elements__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interfaces = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interfaces(self):
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_elements__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/classifiers (container)

    YANG Description: Enclosing container for QoS classifiers
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Enclosing container for QoS classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_elements__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_forwarding_groups(self):
    """
    Getter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)

    YANG Description: Enclosing container for list of forwarding groups
    """
    return self.__forwarding_groups
      
  def _set_forwarding_groups(self, v, load=False):
    """
    Setter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_groups() directly.

    YANG Description: Enclosing container for list of forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__forwarding_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_groups(self):
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_elements__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/queues (container)

    YANG Description: Enclosing container for the list of queues
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Enclosing container for the list of queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_elements__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_elements__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policies(self):
    """
    Getter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    return self.__scheduler_policies
      
  def _set_scheduler_policies(self, v, load=False):
    """
    Setter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policies() directly.

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policies(self):
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_elements__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_buffer_allocation_profiles(self):
    """
    Getter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    return self.__buffer_allocation_profiles
      
  def _set_buffer_allocation_profiles(self, v, load=False):
    """
    Setter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profiles() directly.

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_buffer_allocation_profiles_openconfig_qos_elements__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_elements__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__buffer_allocation_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profiles(self):
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_elements__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queue_management_profiles(self):
    """
    Getter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    return self.__queue_management_profiles
      
  def _set_queue_management_profiles(self, v, load=False):
    """
    Setter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profiles() directly.

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queue_management_profiles_openconfig_qos_elements__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_elements__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queue_management_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profiles(self):
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_elements__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  forwarding_groups = __builtin__.property(_get_forwarding_groups, _set_forwarding_groups)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policies = __builtin__.property(_get_scheduler_policies, _set_scheduler_policies)
  buffer_allocation_profiles = __builtin__.property(_get_buffer_allocation_profiles, _set_buffer_allocation_profiles)
  queue_management_profiles = __builtin__.property(_get_queue_management_profiles, _set_queue_management_profiles)


  _pyangbind_elements = OrderedDict([('interfaces', interfaces), ('classifiers', classifiers), ('forwarding_groups', forwarding_groups), ('queues', queues), ('scheduler_policies', scheduler_policies), ('buffer_allocation_profiles', buffer_allocation_profiles), ('queue_management_profiles', queue_management_profiles), ])


class openconfig_qos_elements(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-elements - based on the path /openconfig-qos-elements. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated with QoS elements.  The primary elements of
the model include:

 classifiers: match packets with a specific characteristic

 forwarding groups: logical class of packets that receive
 common forwarding treatment

 queues:  collection of packets to be scheduled, including
 a queue management scheme

 schedulers: sequence of one more elements that schedule
 packets for transmission, including policer and shaper
 functions
  """
  __slots__ = ('_path_helper', '_extmethods', '__qos',)

  _yang_name = 'openconfig-qos-elements'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_elements__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 []

  def _get_qos(self):
    """
    Getter method for qos, mapped from YANG variable /qos (container)

    YANG Description: Top-level container for QoS data
    """
    return self.__qos
      
  def _set_qos(self, v, load=False):
    """
    Setter method for qos, mapped from YANG variable /qos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_qos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_qos() directly.

    YANG Description: Top-level container for QoS data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_qos_openconfig_qos_elements__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """qos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_qos_openconfig_qos_elements__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__qos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_qos(self):
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_elements__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  qos = __builtin__.property(_get_qos, _set_qos)


  _pyangbind_elements = OrderedDict([('qos', qos), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/config/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data 
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)

    YANG Description: Identifier for the interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/state/interface_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Identifier for the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/interface-ref/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configured reference to interface / subinterface
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/config/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__subinterface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/interface-ref/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for interface-ref
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/interface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: Reference to a base interface.  If a reference to a
subinterface is required, this leaf must be specified
to indicate the base interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    return self.__subinterface
      
  def _set_subinterface(self, v, load=False):
    """
    Setter method for subinterface, mapped from YANG variable /qos/interfaces/interface/interface_ref/state/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subinterface must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__subinterface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subinterface(self):
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="subinterface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ])


class yc_interface_ref_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/interface-ref. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)

    YANG Description: Configured reference to interface / subinterface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/interface_ref/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configured reference to interface / subinterface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)

    YANG Description: Operational state for interface-ref
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/interface_ref/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state for interface-ref
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on ingress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the input (rx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/input/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/input/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_voq_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues/voq-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'voq-interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues', 'voq-interface']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)

    YANG Description: Name used to refer to the egress interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name used to refer to the egress interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the interface
for which the VOQs are instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_virtual_output_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input/virtual-output-queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__voq_interface',)

  _yang_name = 'virtual-output-queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input', 'virtual-output-queues']

  def _get_voq_interface(self):
    """
    Getter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    return self.__voq_interface
      
  def _set_voq_interface(self, v, load=False):
    """
    Setter method for voq_interface, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues/voq_interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_voq_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_voq_interface() directly.

    YANG Description: List of egress interfaces for which a virtual output
queue is instantiated at this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_voq_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """voq_interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__voq_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_voq_interface(self):
    self.__voq_interface = YANGDynClass(base=YANGListType("name",yc_voq_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues_voq_interface, yang_name="voq-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="voq-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  voq_interface = __builtin__.property(_get_voq_interface, _set_voq_interface)


  _pyangbind_elements = OrderedDict([('voq_interface', voq_interface), ])


class yc_input_openconfig_qos_mem_mgmt__qos_interfaces_interface_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data for the ingress
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy','__virtual_output_queues',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'input']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)

    YANG Description: Configuration data for QoS on ingress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)

    YANG Description: Operational state data for QoS on ingress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on ingress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/input/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/input/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/input/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_virtual_output_queues(self):
    """
    Getter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    return self.__virtual_output_queues
      
  def _set_virtual_output_queues(self, v, load=False):
    """
    Setter method for virtual_output_queues, mapped from YANG variable /qos/interfaces/interface/input/virtual_output_queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_output_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_output_queues() directly.

    YANG Description: Surrounding container for the list of egress interfaces
for which virtual output queues are instantiated on this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_virtual_output_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_output_queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__virtual_output_queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_output_queues(self):
    self.__virtual_output_queues = YANGDynClass(base=yc_virtual_output_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_input_virtual_output_queues, is_container='container', yang_name="virtual-output-queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)
  virtual_output_queues = __builtin__.property(_get_virtual_output_queues, _set_virtual_output_queues)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ('virtual_output_queues', virtual_output_queues), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'config']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/config/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile, _set_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile, _set_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS on the egress interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile','__multicast_buffer_allocation_profile','__unicast_buffer_allocation_profile',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'state']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This leaf is used in deployment cases where the operator or system
requires common allocation profiles covering unicast and multicast
packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_buffer_allocation_profile(self):
    """
    Getter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__multicast_buffer_allocation_profile
      
  def _set_multicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for multicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/multicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only multicast packets on
the interface - if specified, the unicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to unicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_buffer_allocation_profile(self):
    self.__multicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_buffer_allocation_profile(self):
    """
    Getter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    return self.__unicast_buffer_allocation_profile
      
  def _set_unicast_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for unicast_buffer_allocation_profile, mapped from YANG variable /qos/interfaces/interface/output/state/unicast_buffer_allocation_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_buffer_allocation_profile() directly.

    YANG Description: The buffer allocation profile that is to be used for the interface.
This profile specifies how memory that is available to the interface
should be allocated amongst the queues that are instantiated on the
interface.

This reference specifies the policy that should be used for memory
allocated to the output (tx) queueing.

This buffer allocation profile applies to only unicast packets on
the interface - if specified, the multicast-buffer-allocation-profile
governs the allocation profile used for memory dedicated to multicast.
If a system does not support, or an operator does not require separate
buffer-allocation-profiles, this is specified by use of the
buffer-allocation-profile leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_buffer_allocation_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_buffer_allocation_profile(self):
    self.__unicast_buffer_allocation_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile)
  multicast_buffer_allocation_profile = __builtin__.property(_get_multicast_buffer_allocation_profile)
  unicast_buffer_allocation_profile = __builtin__.property(_get_unicast_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ('multicast_buffer_allocation_profile', multicast_buffer_allocation_profile), ('unicast_buffer_allocation_profile', unicast_buffer_allocation_profile), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for the list of classifiers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the classifier to be applied to ingress traffic on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of packets matched by the classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of packets matched by the classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {'value': 4}, 'IPV6': {'value': 6}, 'MPLS': {}, 'IPV4_MULTICAST': {}, 'IPV6_MULTICAST': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for match terms in the classifier
associated with an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__matched_packets','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)

    YANG Description: Reference to match terms in the classifier
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match terms in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_matched_packets(self):
    """
    Getter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    return self.__matched_packets
      
  def _set_matched_packets(self, v, load=False):
    """
    Setter method for matched_packets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_packets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_packets() directly.

    YANG Description: Count of the number of packets matching this classifier
match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_packets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_packets(self):
    self.__matched_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state/matched_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_octets() directly.

    YANG Description: Count of the number of octets (bytes) matching this
classifier match term on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_octets(self):
    self.__matched_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  id = __builtin__.property(_get_id)
  matched_packets = __builtin__.property(_get_matched_packets)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('id', id), ('matched_packets', matched_packets), ('matched_octets', matched_octets), ])


class yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms in the classifier associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to match term id list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to match term id list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for match terms in the classifier
associated with an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ])


class yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of match terms in the
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms in the classifier associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of classifiers that should be applied to the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers', 'classifier']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)

    YANG Description: Reference to the classifier name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Reference to the classifier name.
    """
    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=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)

    YANG Description: Configuration parameters for the list of classifiers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)

    YANG Description: Operational state parameters for the list of classifiers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters for the list of classifiers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for the list of match terms in the
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Classifiers to be applied to the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)

    YANG Description: A list of classifiers that should be applied to the interface
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/interfaces/interface/output/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: A list of classifiers that should be applied to the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("type",yc_classifier_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for the queue associated with the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_management_profile','__max_queue_len','__avg_queue_len','__transmit_pkts','__transmit_octets','__dropped_pkts','__dropped_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue associated with this interface.
A queue may be explicitly configured, or implicitly created
by the system based on default queues that are instantiated
by a hardware component, or are assumed to be default on
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/queue_management_profile (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: The queue management profile that is to be used for the queue
on the interface.

For example, the system may use a profile which specifies that
WRED curves are used for setting an ECN mark in the IP header
instead of dropping a packet in order to signal impending
congestion and for determining when there is sufficient
congestion to tail drop packets.

A single profile is available per queue - which applies to all packets
that are enqueued to the specified queue, whether they are unicast or
multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_max_queue_len(self):
    """
    Getter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)

    YANG Description: Maximum observed queue length
    """
    return self.__max_queue_len
      
  def _set_max_queue_len(self, v, load=False):
    """
    Setter method for max_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/max_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_len() directly.

    YANG Description: Maximum observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__max_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_len(self):
    self.__max_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_avg_queue_len(self):
    """
    Getter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)

    YANG Description: Average observed queue length
    """
    return self.__avg_queue_len
      
  def _set_avg_queue_len(self, v, load=False):
    """
    Setter method for avg_queue_len, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/avg_queue_len (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_avg_queue_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_avg_queue_len() directly.

    YANG Description: Average observed queue length
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """avg_queue_len must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__avg_queue_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_avg_queue_len(self):
    self.__avg_queue_len = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="avg-queue-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_pkts(self):
    """
    Getter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)

    YANG Description: Number of packets transmitted by this queue
    """
    return self.__transmit_pkts
      
  def _set_transmit_pkts(self, v, load=False):
    """
    Setter method for transmit_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_pkts() directly.

    YANG Description: Number of packets transmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_pkts(self):
    self.__transmit_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_transmit_octets(self):
    """
    Getter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)

    YANG Description: Number of octets trasmitted by this queue
    """
    return self.__transmit_octets
      
  def _set_transmit_octets(self, v, load=False):
    """
    Setter method for transmit_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/transmit_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_octets() directly.

    YANG Description: Number of octets trasmitted by this queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__transmit_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_octets(self):
    self.__transmit_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_pkts(self):
    """
    Getter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    return self.__dropped_pkts
      
  def _set_dropped_pkts(self, v, load=False):
    """
    Setter method for dropped_pkts, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_pkts() directly.

    YANG Description: Number of packets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_pkts(self):
    self.__dropped_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_dropped_octets(self):
    """
    Getter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    return self.__dropped_octets
      
  def _set_dropped_octets(self, v, load=False):
    """
    Setter method for dropped_octets, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state/dropped_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped_octets() directly.

    YANG Description: Number of octets dropped by the queue due to overrun
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__dropped_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped_octets(self):
    self.__dropped_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dropped-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  queue_management_profile = __builtin__.property(_get_queue_management_profile)
  max_queue_len = __builtin__.property(_get_max_queue_len)
  avg_queue_len = __builtin__.property(_get_avg_queue_len)
  transmit_pkts = __builtin__.property(_get_transmit_pkts)
  transmit_octets = __builtin__.property(_get_transmit_octets)
  dropped_pkts = __builtin__.property(_get_dropped_pkts)
  dropped_octets = __builtin__.property(_get_dropped_octets)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_management_profile', queue_management_profile), ('max_queue_len', max_queue_len), ('avg_queue_len', avg_queue_len), ('transmit_pkts', transmit_pkts), ('transmit_octets', transmit_octets), ('dropped_pkts', dropped_pkts), ('dropped_octets', dropped_octets), ])


class yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for the queue associated with this
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue
instantiated on the interface.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)

    YANG Description: Configuration data for the queue associated with the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)

    YANG Description: Operational state data for the queue associated with the
interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for the queue associated with the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)

    YANG Description: Top-level container for the queue associated with this
interface
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/interfaces/interface/output/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Top-level container for the queue associated with this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: The scheduler policy to be applied to traffic on this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the scheduler
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__conforming_pkts','__conforming_octets','__exceeding_pkts','__exceeding_octets','__violating_pkts','__violating_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID of the scheduler within
the current scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_conforming_pkts(self):
    """
    Getter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    return self.__conforming_pkts
      
  def _set_conforming_pkts(self, v, load=False):
    """
    Setter method for conforming_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_pkts() directly.

    YANG Description: The number of packets that were considered conforming by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_pkts(self):
    self.__conforming_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_conforming_octets(self):
    """
    Getter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    return self.__conforming_octets
      
  def _set_conforming_octets(self, v, load=False):
    """
    Setter method for conforming_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/conforming_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conforming_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conforming_octets() directly.

    YANG Description: The number of octets in packets that were considered
conforming by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conforming_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__conforming_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conforming_octets(self):
    self.__conforming_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="conforming-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_pkts(self):
    """
    Getter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    return self.__exceeding_pkts
      
  def _set_exceeding_pkts(self, v, load=False):
    """
    Setter method for exceeding_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_pkts() directly.

    YANG Description: The number of packets that were considered exceeding by
the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_pkts(self):
    self.__exceeding_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_exceeding_octets(self):
    """
    Getter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    return self.__exceeding_octets
      
  def _set_exceeding_octets(self, v, load=False):
    """
    Setter method for exceeding_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/exceeding_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceeding_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceeding_octets() directly.

    YANG Description: The number of octets in packets that were considered
exceeding by the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceeding_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__exceeding_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceeding_octets(self):
    self.__exceeding_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="exceeding-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_pkts(self):
    """
    Getter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    return self.__violating_pkts
      
  def _set_violating_pkts(self, v, load=False):
    """
    Setter method for violating_pkts, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_pkts() directly.

    YANG Description: The number of packets that were considered violating by
the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_pkts must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_pkts(self):
    self.__violating_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)


  def _get_violating_octets(self):
    """
    Getter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    return self.__violating_octets
      
  def _set_violating_octets(self, v, load=False):
    """
    Setter method for violating_octets, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state/violating_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violating_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violating_octets() directly.

    YANG Description: The number of octets in packets that were considered
violating by the policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violating_octets must be of a type compatible with oc-yang:counter64""",
          'defined-type': "oc-yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__violating_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violating_octets(self):
    self.__violating_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="violating-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:counter64', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  conforming_pkts = __builtin__.property(_get_conforming_pkts)
  conforming_octets = __builtin__.property(_get_conforming_octets)
  exceeding_pkts = __builtin__.property(_get_exceeding_pkts)
  exceeding_octets = __builtin__.property(_get_exceeding_octets)
  violating_pkts = __builtin__.property(_get_violating_pkts)
  violating_octets = __builtin__.property(_get_violating_octets)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('conforming_pkts', conforming_pkts), ('conforming_octets', conforming_octets), ('exceeding_pkts', exceeding_pkts), ('exceeding_octets', exceeding_octets), ('violating_pkts', violating_pkts), ('violating_octets', violating_octets), ])


class yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__state',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the sequence ID for the scheduler.
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the scheduler
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('state', state), ])


class yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the applied scheduler-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', 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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of the schedulers that are part of the scheduler-policy
specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=False)

  scheduler = __builtin__.property(_get_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Scheduler policy associated with the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output', 'scheduler-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy on
an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy
on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the applied scheduler-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_output_openconfig_qos_mem_mgmt__qos_interfaces_interface_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data related to the egress
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__classifiers','__queues','__scheduler_policy',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)

    YANG Description: Configuration data for QoS on the egress interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)

    YANG Description: Operational state data for QoS on the egress interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS on the egress interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)

    YANG Description: Classifiers to be applied to the interface.
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/interfaces/interface/output/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Classifiers to be applied to the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/interfaces/interface/output/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for a list of queues that are
instantiated on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)

    YANG Description: Scheduler policy associated with the interface.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/interfaces/interface/output/scheduler_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: Scheduler policy associated with the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_interfaces_interface_output_scheduler_policy, is_container='container', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('classifiers', classifiers), ('queues', queues), ('scheduler_policy', scheduler_policy), ])


class yc_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__input','__output',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_mem_mgmt__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to the interface-id list key
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /qos/interfaces/interface/interface_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_id() directly.

    YANG Description: Reference to the interface-id list key
    """
    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=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/interfaces/interface/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_interfaces_interface_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)

    YANG Description: Operational state data 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/interfaces/interface/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_interfaces_interface_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /qos/interfaces/interface/interface_ref (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_ref is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_ref() directly.

    YANG Description: Reference to an interface or subinterface. The interface
that is being referenced is uniquely referenced based on
the specified interface and subinterface leaves. In contexts
where a Layer 3 interface is to be referenced, both the
interface and subinterface leaves must be populated, as
Layer 3 configuration within the OpenConfig models is
associated with a subinterface. In the case where a
Layer 2 interface is to be referenced, only the
interface is specified.

The interface/subinterface leaf tuple must be used as
the means by which the interface is specified, regardless
of any other context information (e.g., key in a list).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_ref must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_ref_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_qos_mem_mgmt__qos_interfaces_interface_interface_ref, is_container='container', yang_name="interface-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/interfaces/interface/input (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: Top-level container for QoS data for the ingress
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_input_openconfig_qos_mem_mgmt__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_input_openconfig_qos_mem_mgmt__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=yc_input_openconfig_qos_mem_mgmt__qos_interfaces_interface_input, is_container='container', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/interfaces/interface/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for QoS data related to the egress
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_mem_mgmt__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_interfaces_interface_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  input = __builtin__.property(_get_input, _set_input)
  output = __builtin__.property(_get_output, _set_output)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('input', input), ('output', output), ])


class yc_interfaces_openconfig_qos_mem_mgmt__qos_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /qos/interfaces/interface (list)

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /qos/interfaces/interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface() directly.

    YANG Description: List of interfaces referenced by QoS entities.

The interface referenced is based on the interface and
subinterface leaves within the interface-ref container -
which reference an entry in the /interfaces/interface list -
and should not rely on the value of the list key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("interface_id",yc_interface_openconfig_qos_mem_mgmt__qos_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-id', extensions=None), is_container='list', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for classifers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/config/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)

    YANG Description: User-assigned name of the classifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-assigned name of the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)

    YANG Description: Type of classifier.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/state/type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Type of classifier.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'ETHERNET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for list of match criteria in a QoS
classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  id = __builtin__.property(_get_id, _set_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for list of match criteria in a
QoS classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)

    YANG Description: Identifier for the match term
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Identifier for the match term
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('id', id), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'config']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=True)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=True)

  source_mac = __builtin__.property(_get_source_mac, _set_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask, _set_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac, _set_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask, _set_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype, _set_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/l2/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State Information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_mac','__source_mac_mask','__destination_mac','__destination_mac_mask','__ethertype',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2', 'state']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address.
    """
    return self.__source_mac
      
  def _set_source_mac(self, v, load=False):
    """
    Setter method for source_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac() directly.

    YANG Description: Source IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac(self):
    self.__source_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_source_mac_mask(self):
    """
    Getter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)

    YANG Description: Source IEEE 802 MAC address mask.
    """
    return self.__source_mac_mask
      
  def _set_source_mac_mask(self, v, load=False):
    """
    Setter method for source_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/source_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_mac_mask() directly.

    YANG Description: Source IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__source_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_mac_mask(self):
    self.__source_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="source-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address.
    """
    return self.__destination_mac
      
  def _set_destination_mac(self, v, load=False):
    """
    Setter method for destination_mac, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac() directly.

    YANG Description: Destination IEEE 802 MAC address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac(self):
    self.__destination_mac = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac_mask(self):
    """
    Getter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    return self.__destination_mac_mask
      
  def _set_destination_mac_mask(self, v, load=False):
    """
    Setter method for destination_mac_mask, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/destination_mac_mask (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_mac_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_mac_mask() directly.

    YANG Description: Destination IEEE 802 MAC address mask.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_mac_mask must be of a type compatible with oc-yang:mac-address""",
          'defined-type': "oc-yang:mac-address",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__destination_mac_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_mac_mask(self):
    self.__destination_mac_mask = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="destination-mac-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-yang:mac-address', is_config=False)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)

    YANG Description: Ethertype field to match in Ethernet packets
    """
    return self.__ethertype
      
  def _set_ethertype(self, v, load=False):
    """
    Setter method for ethertype, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state/ethertype (oc-pkt-match-types:ethertype-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethertype is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethertype() directly.

    YANG Description: Ethertype field to match in Ethernet packets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethertype must be of a type compatible with oc-pkt-match-types:ethertype-type""",
          'defined-type': "oc-pkt-match-types:ethertype-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)""",
        })

    self.__ethertype = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethertype(self):
    self.__ethertype = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1536..65535']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV4': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ARP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_VLAN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_IPV6': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_MPLS': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_LLDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:ETHERTYPE_ROCE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="ethertype", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ethertype-type', is_config=False)

  source_mac = __builtin__.property(_get_source_mac)
  source_mac_mask = __builtin__.property(_get_source_mac_mask)
  destination_mac = __builtin__.property(_get_destination_mac)
  destination_mac_mask = __builtin__.property(_get_destination_mac_mask)
  ethertype = __builtin__.property(_get_ethertype)


  _pyangbind_elements = OrderedDict([('source_mac', source_mac), ('source_mac_mask', source_mac_mask), ('destination_mac', destination_mac), ('destination_mac_mask', destination_mac_mask), ('ethertype', ethertype), ])


class yc_l2_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/l2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Ethernet header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'l2'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'l2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)

    YANG Description: State Information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State Information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__destination_address','__destination_address_prefix_set','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)

    YANG Description: Source IPv4 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix Set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)

    YANG Description: Destination IPv4 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv4 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv4-prefix""",
          'defined-type': "oc-inet:ipv4-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|3[0-2])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv4 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)

    YANG Description: ICMPv4 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv4 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TRACEROUTE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)

    YANG Description: ICMPv4 code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMPv4 code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_REPLY_NONE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PROTOCOL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_CANNOT_FRAGMENT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_ROUTE_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_UNKNOWN': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_SRC_HOST_ISOLATED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:DST_UNREACHABLE_PRECEDENCE_CUTOFF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_NETWORK': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:REDIRECT_TOS_HOST': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ECHO_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_NORMAL': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:ROUTER_SELECTION_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_POINTER_INDICATES_ERR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_MISSING_REQ_OPTION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PARAM_PROBLEM_BAD_LENGTH': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:TIMESTAMP_REPLY_NO_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_BAD_SPI': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_AUTH_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECOMPRESS_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_DECRYPTION_FAILED': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHENTICATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:PHOTURIS_NEED_AUTHORIZATION': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUCH_INTF': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}, 'oc-icmpv4-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv4-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv4-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv4 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4', 'icmpv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)

    YANG Description: State attributes for ICMPv4 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv4. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for IPv4 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv4',)

  _yang_name = 'ipv4'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)

    YANG Description: Configuration data for IPv4 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)

    YANG Description: State information for IPv4 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State information for IPv4 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv4(self):
    """
    Getter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)

    YANG Description: Top container for ICMPv4 filtering
    """
    return self.__icmpv4
      
  def _set_icmpv4(self, v, load=False):
    """
    Setter method for icmpv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4/icmpv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv4() directly.

    YANG Description: Top container for ICMPv4 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv4(self):
    self.__icmpv4 = YANGDynClass(base=yc_icmpv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4_icmpv4, is_container='container', yang_name="icmpv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv4 = __builtin__.property(_get_icmpv4, _set_icmpv4)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv4', icmpv4), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=True)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=True)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=True)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  source_address = __builtin__.property(_get_source_address, _set_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set, _set_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label, _set_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address, _set_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set, _set_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label, _set_destination_flow_label)
  dscp = __builtin__.property(_get_dscp, _set_dscp)
  dscp_set = __builtin__.property(_get_dscp_set, _set_dscp_set)
  length = __builtin__.property(_get_length, _set_length)
  protocol = __builtin__.property(_get_protocol, _set_protocol)
  hop_limit = __builtin__.property(_get_hop_limit, _set_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for IPv6 match fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_address','__source_address_prefix_set','__source_flow_label','__destination_address','__destination_address_prefix_set','__destination_flow_label','__dscp','__dscp_set','__length','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)

    YANG Description: Source IPv6 address prefix.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address() directly.

    YANG Description: Source IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__source_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address(self):
    self.__source_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="source-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_source_address_prefix_set(self):
    """
    Getter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    return self.__source_address_prefix_set
      
  def _set_source_address_prefix_set(self, v, load=False):
    """
    Setter method for source_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the source address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_prefix_set(self):
    self.__source_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Source IPv6 Flow label.
    """
    return self.__source_flow_label
      
  def _set_source_flow_label(self, v, load=False):
    """
    Setter method for source_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/source_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_flow_label() directly.

    YANG Description: Source IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__source_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_flow_label(self):
    self.__source_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="source-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)

    YANG Description: Destination IPv6 address prefix.
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address() directly.

    YANG Description: Destination IPv6 address prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with oc-inet:ipv6-prefix""",
          'defined-type': "oc-inet:ipv6-prefix",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__destination_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address(self):
    self.__destination_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'}), is_leaf=True, yang_name="destination-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_destination_address_prefix_set(self):
    """
    Getter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    return self.__destination_address_prefix_set
      
  def _set_destination_address_prefix_set(self, v, load=False):
    """
    Setter method for destination_address_prefix_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_address_prefix_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_address_prefix_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_address_prefix_set() directly.

    YANG Description: Reference to a IPv6 address prefix set
to match the destination address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address_prefix_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_address_prefix_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_address_prefix_set(self):
    self.__destination_address_prefix_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-address-prefix-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)

    YANG Description: Destination IPv6 Flow label.
    """
    return self.__destination_flow_label
      
  def _set_destination_flow_label(self, v, load=False):
    """
    Setter method for destination_flow_label, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/destination_flow_label (oc-inet:ipv6-flow-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_flow_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_flow_label() directly.

    YANG Description: Destination IPv6 Flow label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_flow_label must be of a type compatible with oc-inet:ipv6-flow-label""",
          'defined-type': "oc-inet:ipv6-flow-label",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)""",
        })

    self.__destination_flow_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_flow_label(self):
    self.__destination_flow_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..1048575']}), is_leaf=True, yang_name="destination-flow-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)

    YANG Description: Value of diffserv codepoint.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp() directly.

    YANG Description: Value of diffserv codepoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']}), is_leaf=True, yang_name="dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    return self.__dscp_set
      
  def _set_dscp_set(self, v, load=False):
    """
    Setter method for dscp_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/dscp_set (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dscp_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dscp_set() directly.

    YANG Description: A list of DSCP values to be matched for incoming packets. AN OR match should
be performed, such that a packet must match one of the values defined in this
list. If the field is left empty then any DSCP value matches unless the 'dscp'
leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dscp_set must be of a type compatible with oc-inet:dscp""",
          'defined-type': "oc-inet:dscp",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp_set(self):
    self.__dscp_set = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..63']})), is_leaf=False, yang_name="dscp-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-inet:dscp', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_length() directly.

    YANG Description: In the IPv4 header field, this field is known as the Total
Length.  Total Length is the length of the datagram, measured
in octets, including internet header and data.
In the IPv6 header field, this field is known as the Payload
Length, which is the length of the IPv6 payload, i.e., the rest
of the packet following the IPv6 header, in octets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)""",
        })

    self.__length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_length(self):
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint16', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: The protocol carried in the IP packet, expressed either
as its IP protocol number, or by a defined identity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with oc-pkt-match-types:ip-protocol-type""",
          'defined-type': "oc-pkt-match-types:ip-protocol-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..254']}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_TCP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_UDP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_ICMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IGMP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_PIM': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_RSVP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_GRE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_AUTH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_L2TP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:IP_IN_IP': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},),], is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_hop_limit(self):
    """
    Getter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    return self.__hop_limit
      
  def _set_hop_limit(self, v, load=False):
    """
    Setter method for hop_limit, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state/hop_limit (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_limit() directly.

    YANG Description: The IP packet's hop limit -- known as TTL (in hops) in
IPv4 packets, and hop limit in IPv6
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_limit must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__hop_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_limit(self):
    self.__hop_limit = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..255']}), is_leaf=True, yang_name="hop-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  source_address = __builtin__.property(_get_source_address)
  source_address_prefix_set = __builtin__.property(_get_source_address_prefix_set)
  source_flow_label = __builtin__.property(_get_source_flow_label)
  destination_address = __builtin__.property(_get_destination_address)
  destination_address_prefix_set = __builtin__.property(_get_destination_address_prefix_set)
  destination_flow_label = __builtin__.property(_get_destination_flow_label)
  dscp = __builtin__.property(_get_dscp)
  dscp_set = __builtin__.property(_get_dscp_set)
  length = __builtin__.property(_get_length)
  protocol = __builtin__.property(_get_protocol)
  hop_limit = __builtin__.property(_get_hop_limit)


  _pyangbind_elements = OrderedDict([('source_address', source_address), ('source_address_prefix_set', source_address_prefix_set), ('source_flow_label', source_flow_label), ('destination_address', destination_address), ('destination_address_prefix_set', destination_address_prefix_set), ('destination_flow_label', destination_flow_label), ('dscp', dscp), ('dscp_set', dscp_set), ('length', length), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  code = __builtin__.property(_get_code, _set_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__code',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)

    YANG Description: ICMPv6 type to be matched.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: ICMPv6 type to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DESTINATION_UNREACHABLE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAMETER_PROBLEM': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:VERSION2_MULTICAST_LISTENER': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:CERTIFICATION_PATH_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_ADVERTISEMENT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_SOLICITATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_ROUTER_TERMINATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:FMIPV6': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ILNPV6_LOCATOR_UPDATE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_CONFIRMATION': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MPL_CONTROL': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_code(self):
    """
    Getter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)

    YANG Description: ICMP code to be matched.
    """
    return self.__code
      
  def _set_code(self, v, load=False):
    """
    Setter method for code, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state/code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_code() directly.

    YANG Description: ICMP code to be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """code must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_code(self):
    self.__code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_NO_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_DST_ADMIN_PROHIBITED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_PORT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_REJECT_ROUTE_TO_DST': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DST_UNREACHABLE_HDRS_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PACKET_TOO_BIG_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_HOP_LIMIT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:TIME_EXCEEDED_FRAGMENT_REASSEMBLY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_ERR_HDR_FIELD': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_SR_UPPER_HDR_ERR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_EXT_HDRS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_TOO_MANY_OPTS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:PARAM_PROBLEM_OPT_TOO_BIG': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ECHO_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_QUERY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_REPORT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MULTICAST_LISTENER_DONE_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:ROUTER_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:REDIRECT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUMBERING_COMMAND': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_RESULT': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:RENUNBERING_SEQ_NUM_RESET': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV6_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_NAME': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_QUERY_IPV4_ADDR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NDDE_INFORMATION_RESPONSE_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_SUCCESS': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_REFUSED': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:NODE_INFORMATION_RESPONSE_UNKNOWN': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:INVERSE_NEIGHBOR_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_SOLICITATION_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:MOBILE_PREFIX_ADVERTISEMENT_NO_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_DAR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_DAC': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REQUEST_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_CODE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_ERROR': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MALFORMED_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_INTERFACE': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}, 'oc-icmpv6-types:EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY': {'@module': 'openconfig-icmpv6-types', '@namespace': 'http://openconfig.net/yang/openconfig-icmpv6-types'}},), is_leaf=True, yang_name="code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)
  code = __builtin__.property(_get_code)


  _pyangbind_elements = OrderedDict([('type', type), ('code', code), ])


class yc_icmpv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for ICMPv6 filtering
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'icmpv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6', 'icmpv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)

    YANG Description: State attributes for ICMPv6 filtering
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State attributes for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_ipv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/ipv6. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for IPv6 match field data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__icmpv6',)

  _yang_name = 'ipv6'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'ipv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)

    YANG Description: Configuration data for IPv6 match fields
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)

    YANG Description: Operational state data for IPv6 match fields
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for IPv6 match fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_icmpv6(self):
    """
    Getter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)

    YANG Description: Top container for ICMPv6 filtering
    """
    return self.__icmpv6
      
  def _set_icmpv6(self, v, load=False):
    """
    Setter method for icmpv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6/icmpv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_icmpv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_icmpv6() directly.

    YANG Description: Top container for ICMPv6 filtering
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_icmpv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """icmpv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_icmpv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__icmpv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_icmpv6(self):
    self.__icmpv6 = YANGDynClass(base=yc_icmpv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6_icmpv6, is_container='container', yang_name="icmpv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  icmpv6 = __builtin__.property(_get_icmpv6, _set_icmpv6)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('icmpv6', icmpv6), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'config']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=True)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  source_port = __builtin__.property(_get_source_port, _set_source_port)
  source_port_set = __builtin__.property(_get_source_port_set, _set_source_port_set)
  destination_port = __builtin__.property(_get_destination_port, _set_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set, _set_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode, _set_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode, _set_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags, _set_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail, _set_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data
  """
  __slots__ = ('_path_helper', '_extmethods', '__source_port','__source_port_set','__destination_port','__destination_port_set','__detail_mode','__explicit_detail_match_mode','__explicit_tcp_flags','__builtin_detail',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport', 'state']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)

    YANG Description: Source port or range
    """
    return self.__source_port
      
  def _set_source_port(self, v, load=False):
    """
    Setter method for source_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port() directly.

    YANG Description: Source port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__source_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port(self):
    self.__source_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="source-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_source_port_set(self):
    """
    Getter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)

    YANG Description: Reference to a port set
to match the source port
    """
    return self.__source_port_set
      
  def _set_source_port_set(self, v, load=False):
    """
    Setter method for source_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/source_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_port_set() directly.

    YANG Description: Reference to a port set
to match the source port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__source_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_port_set(self):
    self.__source_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)

    YANG Description: Destination port or range
    """
    return self.__destination_port
      
  def _set_destination_port(self, v, load=False):
    """
    Setter method for destination_port, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port (oc-pkt-match-types:port-num-range)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port() directly.

    YANG Description: Destination port or range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port must be of a type compatible with oc-pkt-match-types:port-num-range""",
          'defined-type': "oc-pkt-match-types:port-num-range",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)""",
        })

    self.__destination_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port(self):
    self.__destination_port = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\\.\\.(0{0,4}[0-9]|0{0,3}[1-9][0-9]|0{0,2}[1-9][0-9]{2}|0?[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'}),RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}},),], is_leaf=True, yang_name="destination-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-pkt-match-types:port-num-range', is_config=False)


  def _get_destination_port_set(self):
    """
    Getter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)

    YANG Description: Reference to a port set
to match the destination port
    """
    return self.__destination_port_set
      
  def _set_destination_port_set(self, v, load=False):
    """
    Setter method for destination_port_set, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/destination_port_set (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination_port_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination_port_set() directly.

    YANG Description: Reference to a port set
to match the destination port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_port_set must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__destination_port_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination_port_set(self):
    self.__destination_port_set = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="destination-port-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_detail_mode(self):
    """
    Getter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    return self.__detail_mode
      
  def _set_detail_mode(self, v, load=False):
    """
    Setter method for detail_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/detail_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detail_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detail_mode() directly.

    YANG Description: Mode that is used for matching detailed fields at the transport
layer. When EXPLICIT is specified, the implementation should
match based on the explicit flags that are specified in the
corresponding leaf. When BUILTIN is specified, the implementation
must expand the contents of the corresponding leaf to the flags
and/or fields that match the pre-defined built-in values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detail_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__detail_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detail_mode(self):
    self.__detail_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXPLICIT': {}, 'BUILTIN': {}},), is_leaf=True, yang_name="detail-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_detail_match_mode(self):
    """
    Getter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    return self.__explicit_detail_match_mode
      
  def _set_explicit_detail_match_mode(self, v, load=False):
    """
    Setter method for explicit_detail_match_mode, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_detail_match_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_detail_match_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_detail_match_mode() directly.

    YANG Description: Specifies how the contents of the explicit-details-flags list
are to be treated. ANY implies that any of the flags may match,
where ALL indicates that all the flags must be matched.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_detail_match_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__explicit_detail_match_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_detail_match_mode(self):
    self.__explicit_detail_match_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ANY': {}, 'ALL': {}},), is_leaf=True, yang_name="explicit-detail-match-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_explicit_tcp_flags(self):
    """
    Getter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    return self.__explicit_tcp_flags
      
  def _set_explicit_tcp_flags(self, v, load=False):
    """
    Setter method for explicit_tcp_flags, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/explicit_tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_tcp_flags() directly.

    YANG Description: An explicit list of the TCP flags that are to be matched. The
mechanism for the match is specified by the explicit-detail-match-mode
leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__explicit_tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_tcp_flags(self):
    self.__explicit_tcp_flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_SYN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_FIN': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_RST': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_PSH': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ACK': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_URG': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_ECE': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}, 'oc-pkt-match-types:TCP_CWR': {'@module': 'openconfig-packet-match-types', '@namespace': 'http://openconfig.net/yang/packet-match-types'}},)), is_leaf=False, yang_name="explicit-tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_builtin_detail(self):
    """
    Getter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    return self.__builtin_detail
      
  def _set_builtin_detail(self, v, load=False):
    """
    Setter method for builtin_detail, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state/builtin_detail (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_builtin_detail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_builtin_detail() directly.

    YANG Description: Specifies a built-in (alias) for a match condition that matches
multiple flags, or specifies particular logic as to the flag matches
to be implemented. This leaf is only valid when the detail-match-mode
leaf is BUILTIN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """builtin_detail must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__builtin_detail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_builtin_detail(self):
    self.__builtin_detail = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TCP_INITIAL': {}, 'TCP_ESTABLISHED': {}, 'FRAGMENT': {}},), is_leaf=True, yang_name="builtin-detail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  source_port = __builtin__.property(_get_source_port)
  source_port_set = __builtin__.property(_get_source_port_set)
  destination_port = __builtin__.property(_get_destination_port)
  destination_port_set = __builtin__.property(_get_destination_port_set)
  detail_mode = __builtin__.property(_get_detail_mode)
  explicit_detail_match_mode = __builtin__.property(_get_explicit_detail_match_mode)
  explicit_tcp_flags = __builtin__.property(_get_explicit_tcp_flags)
  builtin_detail = __builtin__.property(_get_builtin_detail)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('detail_mode', detail_mode), ('explicit_detail_match_mode', explicit_detail_match_mode), ('explicit_tcp_flags', explicit_tcp_flags), ('builtin_detail', builtin_detail), ])


class yc_transport_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport fields container
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)

    YANG Description: Configuration data
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)

    YANG Description: State data
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: State data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to fields within
the MPLS header.
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'config']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=True)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=True)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  traffic_class = __builtin__.property(_get_traffic_class, _set_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value, _set_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value, _set_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value, _set_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to fields
within the MPLS header
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_class','__start_label_value','__end_label_value','__ttl_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls', 'state']

  def _get_traffic_class(self):
    """
    Getter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    return self.__traffic_class
      
  def _set_traffic_class(self, v, load=False):
    """
    Setter method for traffic_class, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/traffic_class (oc-mpls:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_class() directly.

    YANG Description: The value of the MPLS traffic class (TC) bits,
formerly known as the EXP bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_class must be of a type compatible with oc-mpls:mpls-tc""",
          'defined-type': "oc-mpls:mpls-tc",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)""",
        })

    self.__traffic_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_class(self):
    self.__traffic_class = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="traffic-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-tc', is_config=False)


  def _get_start_label_value(self):
    """
    Getter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__start_label_value
      
  def _set_start_label_value(self, v, load=False):
    """
    Setter method for start_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/start_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_start_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_start_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """start_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__start_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_start_label_value(self):
    self.__start_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="start-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_end_label_value(self):
    """
    Getter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    return self.__end_label_value
      
  def _set_end_label_value(self, v, load=False):
    """
    Setter method for end_label_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/end_label_value (oc-mpls:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_end_label_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_end_label_value() directly.

    YANG Description: Match MPLS label value on the MPLS header.
The usage of this field indicated the upper
range value in the top of the stack.
The range that is used is inclusive. The match that
is done for a particular received pkt_label is:
start-label-value <= pkt_label <= end-label-value.
The 20-bit label value in an MPLS label
stack as specified in RFC 3032.
This label value does not include the
encodings of Traffic Class and TTL.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """end_label_value must be of a type compatible with oc-mpls:mpls-label""",
          'defined-type': "oc-mpls:mpls-label",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)""",
        })

    self.__end_label_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_end_label_value(self):
    self.__end_label_value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['16..1048575']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_EXPLICIT_NULL': {'value': 0}, 'ROUTER_ALERT': {'value': 1}, 'IPV6_EXPLICIT_NULL': {'value': 2}, 'IMPLICIT_NULL': {'value': 3}, 'ENTROPY_LABEL_INDICATOR': {'value': 7}, 'NO_LABEL': {}},),], is_leaf=True, yang_name="end-label-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-mpls:mpls-label', is_config=False)


  def _get_ttl_value(self):
    """
    Getter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)

    YANG Description: Time-to-live MPLS packet value match.
    """
    return self.__ttl_value
      
  def _set_ttl_value(self, v, load=False):
    """
    Setter method for ttl_value, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state/ttl_value (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_value() directly.

    YANG Description: Time-to-live MPLS packet value match.
    """
    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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_value 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="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__ttl_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_value(self):
    self.__ttl_value = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ttl-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  traffic_class = __builtin__.property(_get_traffic_class)
  start_label_value = __builtin__.property(_get_start_label_value)
  end_label_value = __builtin__.property(_get_end_label_value)
  ttl_value = __builtin__.property(_get_ttl_value)


  _pyangbind_elements = OrderedDict([('traffic_class', traffic_class), ('start_label_value', start_label_value), ('end_label_value', end_label_value), ('ttl_value', ttl_value), ])


class yc_mpls_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS header fields
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to fields within
the MPLS header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to fields
within the MPLS header
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_conditions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/conditions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__l2','__ipv4','__ipv6','__transport','__mpls',)

  _yang_name = 'conditions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'conditions']

  def _get_l2(self):
    """
    Getter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)

    YANG Description: Ethernet header fields
    """
    return self.__l2
      
  def _set_l2(self, v, load=False):
    """
    Setter method for l2, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/l2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2() directly.

    YANG Description: Ethernet header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__l2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2(self):
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_l2, is_container='container', yang_name="l2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv4(self):
    """
    Getter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)

    YANG Description: Top level container for IPv4 match field data
    """
    return self.__ipv4
      
  def _set_ipv4(self, v, load=False):
    """
    Setter method for ipv4, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4() directly.

    YANG Description: Top level container for IPv4 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4(self):
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv4, is_container='container', yang_name="ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_ipv6(self):
    """
    Getter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)

    YANG Description: Top-level container for IPv6 match field data
    """
    return self.__ipv6
      
  def _set_ipv6(self, v, load=False):
    """
    Setter method for ipv6, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6() directly.

    YANG Description: Top-level container for IPv6 match field data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6(self):
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_ipv6, is_container='container', yang_name="ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)

    YANG Description: Transport fields container
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/transport (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transport is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transport() directly.

    YANG Description: Transport fields container
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transport must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transport_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__transport = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transport(self):
    self.__transport = YANGDynClass(base=yc_transport_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_transport, is_container='container', yang_name="transport", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)

    YANG Description: MPLS header fields
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions/mpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls() directly.

    YANG Description: MPLS header fields
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__mpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls(self):
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions_mpls, is_container='container', yang_name="mpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  l2 = __builtin__.property(_get_l2, _set_l2)
  ipv4 = __builtin__.property(_get_ipv4, _set_ipv4)
  ipv6 = __builtin__.property(_get_ipv6, _set_ipv6)
  transport = __builtin__.property(_get_transport, _set_transport)
  mpls = __builtin__.property(_get_mpls, _set_mpls)


  _pyangbind_elements = OrderedDict([('l2', l2), ('ipv4', ipv4), ('ipv6', ipv6), ('transport', transport), ('mpls', mpls), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied to packets that match the classifier
term.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'config']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  target_group = __builtin__.property(_get_target_group, _set_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters associated with classifier term
actions
  """
  __slots__ = ('_path_helper', '_extmethods', '__target_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'state']

  def _get_target_group(self):
    """
    Getter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    return self.__target_group
      
  def _set_target_group(self, v, load=False):
    """
    Setter method for target_group, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state/target_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target_group() directly.

    YANG Description: References the forwarding group or class to which the
matched packets should be assigned
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__target_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target_group(self):
    self.__target_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="target-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  target_group = __builtin__.property(_get_target_group)


  _pyangbind_elements = OrderedDict([('target_group', target_group), ])


class yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions/remark/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions/remark/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to remarking packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_remark_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions/remark. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remark'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions', 'remark']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)

    YANG Description: Configuration parameters relating to remarking packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)

    YANG Description: Operational state parameters relating to remarking packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to remarking packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_actions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term/actions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Actions to be applied for packets matching the specified
classification rules.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__remark',)

  _yang_name = 'actions'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term', 'actions']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Actions to be applied to packets that match the classifier
term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters associated with classifier term
actions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_remark(self):
    """
    Getter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    return self.__remark
      
  def _set_remark(self, v, load=False):
    """
    Setter method for remark, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions/remark (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remark() directly.

    YANG Description: Remark actions to be associated with packets that match the
classifier term. Where a packet matches these criteria, the
specified rewrite actions should be performed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remark_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remark must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remark_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__remark = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remark(self):
    self.__remark = YANGDynClass(base=yc_remark_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions_remark, is_container='container', yang_name="remark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  remark = __builtin__.property(_get_remark, _set_remark)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('remark', remark), ])


class yc_term_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms/term. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of match terms used in the classifier
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state','__conditions','__actions',)

  _yang_name = 'term'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms', 'term']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)

    YANG Description: Reference to id list key.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/classifiers/classifier/terms/term/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to id list key.
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/terms/term/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for list of match criteria in a QoS
classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/terms/term/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for list of match criteria in a
QoS classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conditions(self):
    """
    Getter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    return self.__conditions
      
  def _set_conditions(self, v, load=False):
    """
    Setter method for conditions, mapped from YANG variable /qos/classifiers/classifier/terms/term/conditions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conditions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conditions() directly.

    YANG Description: Conditions for the classifier term. Packets must match all of
the criteria specified within the match condition to be considered
matching the term.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conditions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conditions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conditions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conditions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conditions(self):
    self.__conditions = YANGDynClass(base=yc_conditions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_conditions, is_container='container', yang_name="conditions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_actions(self):
    """
    Getter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    return self.__actions
      
  def _set_actions(self, v, load=False):
    """
    Setter method for actions, mapped from YANG variable /qos/classifiers/classifier/terms/term/actions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_actions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_actions() directly.

    YANG Description: Actions to be applied for packets matching the specified
classification rules.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_actions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """actions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_actions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__actions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_actions(self):
    self.__actions = YANGDynClass(base=yc_actions_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term_actions, is_container='container', yang_name="actions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conditions = __builtin__.property(_get_conditions, _set_conditions)
  actions = __builtin__.property(_get_actions, _set_actions)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ('conditions', conditions), ('actions', actions), ])


class yc_terms_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier/terms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for ths list of terms
  """
  __slots__ = ('_path_helper', '_extmethods', '__term',)

  _yang_name = 'terms'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers', 'classifier', 'terms']

  def _get_term(self):
    """
    Getter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)

    YANG Description: List of match terms used in the classifier
    """
    return self.__term
      
  def _set_term(self, v, load=False):
    """
    Setter method for term, mapped from YANG variable /qos/classifiers/classifier/terms/term (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_term is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_term() directly.

    YANG Description: List of match terms used in the classifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """term must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__term = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_term(self):
    self.__term = YANGDynClass(base=YANGListType("id",yc_term_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms_term, yang_name="term", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="term", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  term = __builtin__.property(_get_term, _set_term)


  _pyangbind_elements = OrderedDict([('term', term), ])


class yc_classifier_openconfig_qos_mem_mgmt__qos_classifiers_classifier(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers/classifier. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of classifier elements
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__terms',)

  _yang_name = 'classifier'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'classifiers', 'classifier']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)

    YANG Description: Reference to list key name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/classifiers/classifier/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to list key name
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)

    YANG Description: Configuration data for classifers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/classifiers/classifier/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for classifers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_classifiers_classifier_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)

    YANG Description: Operational state data for classifiers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/classifiers/classifier/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_classifiers_classifier_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_terms(self):
    """
    Getter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)

    YANG Description: Enclosing container for ths list of terms
    """
    return self.__terms
      
  def _set_terms(self, v, load=False):
    """
    Setter method for terms, mapped from YANG variable /qos/classifiers/classifier/terms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_terms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_terms() directly.

    YANG Description: Enclosing container for ths list of terms
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_terms_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """terms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__terms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_terms(self):
    self.__terms = YANGDynClass(base=yc_terms_openconfig_qos_mem_mgmt__qos_classifiers_classifier_terms, is_container='container', yang_name="terms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  terms = __builtin__.property(_get_terms, _set_terms)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('terms', terms), ])


class yc_classifiers_openconfig_qos_mem_mgmt__qos_classifiers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/classifiers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for QoS classifiers
  """
  __slots__ = ('_path_helper', '_extmethods', '__classifier',)

  _yang_name = 'classifiers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_mem_mgmt__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'classifiers']

  def _get_classifier(self):
    """
    Getter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)

    YANG Description: List of classifier elements
    """
    return self.__classifier
      
  def _set_classifier(self, v, load=False):
    """
    Setter method for classifier, mapped from YANG variable /qos/classifiers/classifier (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifier() directly.

    YANG Description: List of classifier elements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_classifier_openconfig_qos_mem_mgmt__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifier must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_mem_mgmt__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__classifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifier(self):
    self.__classifier = YANGDynClass(base=YANGListType("name",yc_classifier_openconfig_qos_mem_mgmt__qos_classifiers_classifier, yang_name="classifier", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="classifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  classifier = __builtin__.property(_get_classifier, _set_classifier)


  _pyangbind_elements = OrderedDict([('classifier', classifier), ])


class yc_config_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/forwarding-groups/forwarding-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  fabric_priority = __builtin__.property(_get_fabric_priority, _set_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue, _set_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue, _set_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue, _set_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_state_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/forwarding-groups/forwarding-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__fabric_priority','__output_queue','__unicast_output_queue','__multicast_output_queue',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'forwarding-groups', 'forwarding-group', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)

    YANG Description: Name of the forwarding group
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name of the forwarding group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_fabric_priority(self):
    """
    Getter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    return self.__fabric_priority
      
  def _set_fabric_priority(self, v, load=False):
    """
    Setter method for fabric_priority, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/fabric_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fabric_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fabric_priority() directly.

    YANG Description: Set the priority for the forwarding group for
local transmission through the device, e.g.,
across a switching fabric. Higher priorities
are considered to be better, such that traffic
with fabric priority 128 is considered to be
higher priority than that with fabric priority
0.
    """
    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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fabric_priority 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="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__fabric_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fabric_priority(self):
    self.__fabric_priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="fabric-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_output_queue(self):
    """
    Getter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    return self.__output_queue
      
  def _set_output_queue(self, v, load=False):
    """
    Setter method for output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_queue() directly.

    YANG Description: Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_queue(self):
    self.__output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_unicast_output_queue(self):
    """
    Getter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__unicast_output_queue
      
  def _set_unicast_output_queue(self, v, load=False):
    """
    Setter method for unicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/unicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unicast_output_queue() directly.

    YANG Description: Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__unicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unicast_output_queue(self):
    self.__unicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="unicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_multicast_output_queue(self):
    """
    Getter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    return self.__multicast_output_queue
      
  def _set_multicast_output_queue(self, v, load=False):
    """
    Setter method for multicast_output_queue, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state/multicast_output_queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_output_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_output_queue() directly.

    YANG Description: Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_output_queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__multicast_output_queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_output_queue(self):
    self.__multicast_output_queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-output-queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  fabric_priority = __builtin__.property(_get_fabric_priority)
  output_queue = __builtin__.property(_get_output_queue)
  unicast_output_queue = __builtin__.property(_get_unicast_output_queue)
  multicast_output_queue = __builtin__.property(_get_multicast_output_queue)


  _pyangbind_elements = OrderedDict([('name', name), ('fabric_priority', fabric_priority), ('output_queue', output_queue), ('unicast_output_queue', unicast_output_queue), ('multicast_output_queue', multicast_output_queue), ])


class yc_forwarding_group_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/forwarding-groups/forwarding-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'forwarding-group'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'forwarding-groups', 'forwarding-group']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)

    YANG Description: Reference to name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/forwarding_groups/forwarding_group/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to name list key
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)

    YANG Description: Configuration data for forwarding groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/forwarding_groups/forwarding_group/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)

    YANG Description: Operational state data for forwarding groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/forwarding_groups/forwarding_group/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_forwarding_groups_openconfig_qos_mem_mgmt__qos_forwarding_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/forwarding-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of forwarding groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_group',)

  _yang_name = 'forwarding-groups'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'forwarding-groups']

  def _get_forwarding_group(self):
    """
    Getter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    return self.__forwarding_group
      
  def _set_forwarding_group(self, v, load=False):
    """
    Setter method for forwarding_group, mapped from YANG variable /qos/forwarding_groups/forwarding_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_group() directly.

    YANG Description: List of forwarding groups.  Forwarding groups are
logical groups of traffic that will receive common
forwarding treatment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_forwarding_group_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__forwarding_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_group(self):
    self.__forwarding_group = YANGDynClass(base=YANGListType("name",yc_forwarding_group_openconfig_qos_mem_mgmt__qos_forwarding_groups_forwarding_group, yang_name="forwarding-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="forwarding-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  forwarding_group = __builtin__.property(_get_forwarding_group, _set_forwarding_group)


  _pyangbind_elements = OrderedDict([('forwarding_group', forwarding_group), ])


class yc_config_openconfig_qos_mem_mgmt__qos_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/config/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  queue_id = __builtin__.property(_get_queue_id, _set_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_state_openconfig_qos_mem_mgmt__qos_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__queue_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)

    YANG Description: User-defined name of the queue
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: User-defined name of the queue
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_queue_id(self):
    """
    Getter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    return self.__queue_id
      
  def _set_queue_id(self, v, load=False):
    """
    Setter method for queue_id, mapped from YANG variable /qos/queues/queue/state/queue_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_id() directly.

    YANG Description: An optional identifier which may be required by some hardware to map
the named queue to a hardware queue
    """
    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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_id 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="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__queue_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_id(self):
    self.__queue_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="queue-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  name = __builtin__.property(_get_name)
  queue_id = __builtin__.property(_get_queue_id)


  _pyangbind_elements = OrderedDict([('name', name), ('queue_id', queue_id), ])


class yc_queue_openconfig_qos_mem_mgmt__qos_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)

    YANG Description: Reference to the queue name list key.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue name list key.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queues/queue/config (container)

    YANG Description: Configuration data for queues
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queues/queue/state (container)

    YANG Description: Operational state data for queues
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_mem_mgmt__qos_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of queues
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/queues/queue (list)

    YANG Description: List of defined queues
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: List of defined queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)

    YANG Description: Name for the scheduler policy.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Name for the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'config']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  type = __builtin__.property(_get_type, _set_type)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for QoS schedulers
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__type','__priority',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'state']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/sequence (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Sequence number for the scheduler within the scheduler
policy. Schedulers are processed from lowest sequence
to highest.
    """
    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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence 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="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type() directly.

    YANG Description: Sets the type of scheduler, i.e. the scheduling algorithm
used to serve inputs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:ONE_RATE_TWO_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}, 'oc-qos-types:TWO_RATE_THREE_COLOR': {'@module': 'openconfig-qos-types', '@namespace': 'http://openconfig.net/yang/qos-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state/priority (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_priority() directly.

    YANG Description: Priority of the scheduler within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}},), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)

  sequence = __builtin__.property(_get_sequence)
  type = __builtin__.property(_get_type)
  priority = __builtin__.property(_get_priority)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('type', type), ('priority', priority), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  input_type = __builtin__.property(_get_input_type, _set_input_type)
  queue = __builtin__.property(_get_queue, _set_queue)
  weight = __builtin__.property(_get_weight, _set_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler input sources
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__input_type','__queue','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)

    YANG Description: User-defined identifier for the scheduler input
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: User-defined identifier for the scheduler input
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)


  def _get_input_type(self):
    """
    Getter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)

    YANG Description: Describes the type of input source for the scheduler
    """
    return self.__input_type
      
  def _set_input_type(self, v, load=False):
    """
    Setter method for input_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/input_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_type() directly.

    YANG Description: Describes the type of input source for the scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__input_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_type(self):
    self.__input_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'QUEUE': {}, 'IN_PROFILE': {}, 'OUT_PROFILE': {}},), is_leaf=True, yang_name="input-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/queue (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Reference to a queue that is an input source for the
scheduler
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state/weight (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: For priority schedulers, this indicates the priority of
the corresponding input.  Higher values indicate higher
priority.  For weighted round-robin schedulers, this leaf
indicates the weight of the corresponding input.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)

  id = __builtin__.property(_get_id)
  input_type = __builtin__.property(_get_input_type)
  queue = __builtin__.property(_get_queue)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('id', id), ('input_type', input_type), ('queue', queue), ('weight', weight), ])


class yc_input_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs/input. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of input sources for the scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'input'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs', 'input']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)

    YANG Description: Reference to list key
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id() directly.

    YANG Description: Reference to list key
    """
    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=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)

    YANG Description: Configuration data for scheduler input sources
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)

    YANG Description: Operational state data for scheduler input sources
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler input sources
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ])


class yc_inputs_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/inputs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container 
  """
  __slots__ = ('_path_helper', '_extmethods', '__input',)

  _yang_name = 'inputs'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'inputs']

  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)

    YANG Description: List of input sources for the scheduler.
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs/input (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input() directly.

    YANG Description: List of input sources for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_input_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=YANGListType("id",yc_input_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs_input, yang_name="input", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  input = __builtin__.property(_get_input, _set_input)


  _pyangbind_elements = OrderedDict([('input', input), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'config']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=True)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)

  output_type = __builtin__.property(_get_output_type, _set_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler, _set_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group, _set_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for scheduler output
  """
  __slots__ = ('_path_helper', '_extmethods', '__output_type','__child_scheduler','__output_fwd_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output', 'state']

  def _get_output_type(self):
    """
    Getter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)

    YANG Description: Describes the type of output sink for the scheduler.
    """
    return self.__output_type
      
  def _set_output_type(self, v, load=False):
    """
    Setter method for output_type, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_type() directly.

    YANG Description: Describes the type of output sink for the scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-qos:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)""",
        })

    self.__output_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_type(self):
    self.__output_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SCHEDULER': {}, 'FWD_GROUP': {}, 'INTERFACE': {}},), is_leaf=True, yang_name="output-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='enumeration', is_config=False)


  def _get_child_scheduler(self):
    """
    Getter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    return self.__child_scheduler
      
  def _set_child_scheduler(self, v, load=False):
    """
    Setter method for child_scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/child_scheduler (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_child_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_child_scheduler() directly.

    YANG Description: When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """child_scheduler must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__child_scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_child_scheduler(self):
    self.__child_scheduler = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="child-scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_output_fwd_group(self):
    """
    Getter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    return self.__output_fwd_group
      
  def _set_output_fwd_group(self, v, load=False):
    """
    Setter method for output_fwd_group, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state/output_fwd_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output_fwd_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output_fwd_group() directly.

    YANG Description: When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output_fwd_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__output_fwd_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output_fwd_group(self):
    self.__output_fwd_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="output-fwd-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)

  output_type = __builtin__.property(_get_output_type)
  child_scheduler = __builtin__.property(_get_child_scheduler)
  output_fwd_group = __builtin__.property(_get_output_fwd_group)


  _pyangbind_elements = OrderedDict([('output_type', output_type), ('child_scheduler', child_scheduler), ('output_fwd_group', output_fwd_group), ])


class yc_output_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/output. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for scheduler output data
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'output'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'output']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)

    YANG Description: Configuration data for scheduler output
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)

    YANG Description: Operational state data for scheduler output
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for scheduler output
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=True)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior, _set_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes, _set_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets, _set_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent, _set_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 1 rate, 2 color shapers
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__bc','__queuing_behavior','__max_queue_depth_bytes','__max_queue_depth_packets','__max_queue_depth_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler.  This value represents the rate at which
tokens are added to the bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the total bandwidth allocated to the
context in which the scheduler is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the single-rate token
bucket scheduler. This value represents the rate at which
tokens are added to the bucket. It is expressed as a
percentage of the unallocated bandwidth available in the
context in which the scheduled is referenced.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the single-rate token bucket
scheduler.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_queuing_behavior(self):
    """
    Getter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)

    YANG Description: The type of scheduler that is being configured.
    """
    return self.__queuing_behavior
      
  def _set_queuing_behavior(self, v, load=False):
    """
    Setter method for queuing_behavior, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/queuing_behavior (oc-qos-types:queue-behavior)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queuing_behavior is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queuing_behavior() directly.

    YANG Description: The type of scheduler that is being configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queuing_behavior must be of a type compatible with oc-qos-types:queue-behavior""",
          'defined-type': "oc-qos-types:queue-behavior",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)""",
        })

    self.__queuing_behavior = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queuing_behavior(self):
    self.__queuing_behavior = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SHAPE': {}, 'POLICE': {}},), is_leaf=True, yang_name="queuing-behavior", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-qos-types:queue-behavior', is_config=False)


  def _get_max_queue_depth_bytes(self):
    """
    Getter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    return self.__max_queue_depth_bytes
      
  def _set_max_queue_depth_bytes(self, v, load=False):
    """
    Setter method for max_queue_depth_bytes, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_bytes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_bytes() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in bytes is the value
specified by this leaf.
    """
    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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_bytes 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="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_bytes(self):
    self.__max_queue_depth_bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_packets(self):
    """
    Getter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    return self.__max_queue_depth_packets
      
  def _set_max_queue_depth_packets(self, v, load=False):
    """
    Setter method for max_queue_depth_packets, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_packets (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_packets() directly.

    YANG Description: When the scheduler is specified to be a shaper - the
maximum depth of the queue in packets is the value
specified by this leaf.
    """
    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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_packets 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="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__max_queue_depth_packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_packets(self):
    self.__max_queue_depth_packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-queue-depth-packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_queue_depth_percent(self):
    """
    Getter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    return self.__max_queue_depth_percent
      
  def _set_max_queue_depth_percent(self, v, load=False):
    """
    Setter method for max_queue_depth_percent, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state/max_queue_depth_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_queue_depth_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_queue_depth_percent() directly.

    YANG Description: The queue depth specified as a percentage of the total
available buffer that is avaialble.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_queue_depth_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_queue_depth_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_queue_depth_percent(self):
    self.__max_queue_depth_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-queue-depth-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  queuing_behavior = __builtin__.property(_get_queuing_behavior)
  max_queue_depth_bytes = __builtin__.property(_get_max_queue_depth_bytes)
  max_queue_depth_packets = __builtin__.property(_get_max_queue_depth_packets)
  max_queue_depth_percent = __builtin__.property(_get_max_queue_depth_percent)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('bc', bc), ('queuing_behavior', queuing_behavior), ('max_queue_depth_bytes', max_queue_depth_bytes), ('max_queue_depth_packets', max_queue_depth_packets), ('max_queue_depth_percent', max_queue_depth_percent), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to conforming packets for the
1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to conforming packets
for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to exceeding packets for
the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to exceeding
packets for the 1r2c scheduler.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_one_rate_two_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/one-rate-two-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action',)

  _yang_name = 'one-rate-two-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'one-rate-two-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 1 rate, 2 color shapers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to packets that are scheduled within the
CIR of the one-rate, two-colour scheduler. Packets that receive
a token from the in-CIR bucket are said to be conforming and
have all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to packets that are scheduled above the CIR
of the one-rate, two-colour shaper. Packets that do not receive a
token from the in-CIR bucket are said to be exceeding, and have
all of the specified actions applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'config']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)

  cir = __builtin__.property(_get_cir, _set_cir)
  cir_pct = __builtin__.property(_get_cir_pct, _set_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining, _set_cir_pct_remaining)
  pir = __builtin__.property(_get_pir, _set_pir)
  pir_pct = __builtin__.property(_get_pir_pct, _set_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining, _set_pir_pct_remaining)
  bc = __builtin__.property(_get_bc, _set_bc)
  be = __builtin__.property(_get_be, _set_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for 2 rate, 3 color policers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__cir','__cir_pct','__cir_pct_remaining','__pir','__pir_pct','__pir_pct_remaining','__bc','__be',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'state']

  def _get_cir(self):
    """
    Getter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    return self.__cir
      
  def _set_cir(self, v, load=False):
    """
    Setter method for cir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer.  This value represents the rate at which
tokens are added to the primary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__cir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir(self):
    self.__cir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_cir_pct(self):
    """
    Getter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    return self.__cir_pct
      
  def _set_cir_pct(self, v, load=False):
    """
    Setter method for cir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct() directly.

    YANG Description: Committed information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the primary bucket. It is expressed as a
percentage of the total bandwidth available within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct(self):
    self.__cir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_cir_pct_remaining(self):
    """
    Getter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__cir_pct_remaining
      
  def _set_cir_pct_remaining(self, v, load=False):
    """
    Setter method for cir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/cir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cir_pct_remaining() directly.

    YANG Description: Committed information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the primary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__cir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cir_pct_remaining(self):
    self.__cir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="cir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir(self):
    """
    Getter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    return self.__pir
      
  def _set_pir(self, v, load=False):
    """
    Setter method for pir, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer.  This value represents the rate at which tokens
are added to the secondary bucket.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__pir = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir(self):
    self.__pir = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="pir", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_pir_pct(self):
    """
    Getter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    return self.__pir_pct
      
  def _set_pir_pct(self, v, load=False):
    """
    Setter method for pir_pct, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct() directly.

    YANG Description: Peak information rate for the dual-rate token bucket
policer. This value represents the rate at which tokens
are added to the secondary bucket. The value is expressed
as a percentage of the total bandwidth available in the
context in which the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct(self):
    self.__pir_pct = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_pir_pct_remaining(self):
    """
    Getter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    return self.__pir_pct_remaining
      
  def _set_pir_pct_remaining(self, v, load=False):
    """
    Setter method for pir_pct_remaining, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/pir_pct_remaining (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pir_pct_remaining is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pir_pct_remaining() directly.

    YANG Description: Peak information rate for the dual-rate token
bucket policer. This value represents the rate at which
tokens are added to the secondary bucket. It is expressed
as a percentage of the remaining bandwidth within the
context the scheduler is instantiated.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pir_pct_remaining must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__pir_pct_remaining = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pir_pct_remaining(self):
    self.__pir_pct_remaining = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="pir-pct-remaining", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)


  def _get_bc(self):
    """
    Getter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    return self.__bc
      
  def _set_bc(self, v, load=False):
    """
    Setter method for bc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/bc (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bc() directly.

    YANG Description: Committed burst size for the dual-rate token bucket
policer.  This value represents the depth of the token
bucket.
    """
    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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bc 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="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__bc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bc(self):
    self.__bc = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_be(self):
    """
    Getter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    return self.__be
      
  def _set_be(self, v, load=False):
    """
    Setter method for be, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state/be (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_be is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_be() directly.

    YANG Description: Excess burst size for the dual-rate token bucket policer.
This value represents the depth of the secondary bucket.
    """
    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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """be 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="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__be = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_be(self):
    self.__be = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="be", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)

  cir = __builtin__.property(_get_cir)
  cir_pct = __builtin__.property(_get_cir_pct)
  cir_pct_remaining = __builtin__.property(_get_cir_pct_remaining)
  pir = __builtin__.property(_get_pir)
  pir_pct = __builtin__.property(_get_pir_pct)
  pir_pct_remaining = __builtin__.property(_get_pir_pct_remaining)
  bc = __builtin__.property(_get_bc)
  be = __builtin__.property(_get_be)


  _pyangbind_elements = OrderedDict([('cir', cir), ('cir_pct', cir_pct), ('cir_pct_remaining', cir_pct_remaining), ('pir', pir), ('pir_pct', pir_pct), ('pir_pct_remaining', pir_pct_remaining), ('bc', bc), ('be', be), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the conform action of a
2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ])


class yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/conform-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'conform-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'conform-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for the conform action of a
2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the conform
action of a 2r3c policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/exceed-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'exceed-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'exceed-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to exceeding packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'config']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  set_dscp = __builtin__.property(_get_set_dscp, _set_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p, _set_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc, _set_set_mpls_tc)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the action
applied to violating packets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_dscp','__set_dot1p','__set_mpls_tc','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action', 'state']

  def _get_set_dscp(self):
    """
    Getter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    return self.__set_dscp
      
  def _set_set_dscp(self, v, load=False):
    """
    Setter method for set_dscp, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dscp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dscp() directly.

    YANG Description: Sets the 6-bit DSCP (differentiated services code point)
value in the IP packet header.
    """
    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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dscp 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="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dscp(self):
    self.__set_dscp = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_dot1p(self):
    """
    Getter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    return self.__set_dot1p
      
  def _set_set_dot1p(self, v, load=False):
    """
    Setter method for set_dot1p, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_dot1p (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_dot1p is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_dot1p() directly.

    YANG Description: Sets the 3-bit class-of-service value in the
Ethernet packet header for 802.1Q VLAN-tagged packets,
also known as PCP (priority code point).
    """
    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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_dot1p 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="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_dot1p = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_dot1p(self):
    self.__set_dot1p = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-dot1p", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_set_mpls_tc(self):
    """
    Getter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    return self.__set_mpls_tc
      
  def _set_set_mpls_tc(self, v, load=False):
    """
    Setter method for set_mpls_tc, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/set_mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_mpls_tc() directly.

    YANG Description: Sets the 3-bit traffic class value (also referred to as EXP
or CoS) in MPLS packets.
    """
    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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_mpls_tc 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="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)""",
        })

    self.__set_mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_mpls_tc(self):
    self.__set_mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="set-mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint8', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)

    YANG Description: If set to true, packets within this context are dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: If set to true, packets within this context are dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  set_dscp = __builtin__.property(_get_set_dscp)
  set_dot1p = __builtin__.property(_get_set_dot1p)
  set_mpls_tc = __builtin__.property(_get_set_mpls_tc)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('set_dscp', set_dscp), ('set_dot1p', set_dot1p), ('set_mpls_tc', set_mpls_tc), ('drop', drop), ])


class yc_violate_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color/violate-action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'violate-action'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color', 'violate-action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the action
applied to violating packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_two_rate_three_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler/two-rate-three-color. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for data for a 2 rate, 3 color policer.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__conform_action','__exceed_action','__violate_action',)

  _yang_name = 'two-rate-three-color'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler', 'two-rate-three-color']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for 2 rate, 3 color policers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_conform_action(self):
    """
    Getter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    return self.__conform_action
      
  def _set_conform_action(self, v, load=False):
    """
    Setter method for conform_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/conform_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conform_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conform_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the CIR of the policer. All packets that receive
a token from this bucket have all actions specified
applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conform_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__conform_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conform_action(self):
    self.__conform_action = YANGDynClass(base=yc_conform_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_conform_action, is_container='container', yang_name="conform-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_exceed_action(self):
    """
    Getter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    return self.__exceed_action
      
  def _set_exceed_action(self, v, load=False):
    """
    Setter method for exceed_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/exceed_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
within the PIR of the policer. Packets that receive a
token from within the PIR allocation have all the
specified actions applied to them
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__exceed_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_action(self):
    self.__exceed_action = YANGDynClass(base=yc_exceed_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_exceed_action, is_container='container', yang_name="exceed-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_violate_action(self):
    """
    Getter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    return self.__violate_action
      
  def _set_violate_action(self, v, load=False):
    """
    Setter method for violate_action, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color/violate_action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_violate_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_violate_action() directly.

    YANG Description: Action to be applied to the packets that are scheduled
above the PIR of the policer. Packets that do not receive
a token from either bucket have all specified actions
applied to them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_violate_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """violate_action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_violate_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__violate_action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_violate_action(self):
    self.__violate_action = YANGDynClass(base=yc_violate_action_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color_violate_action, is_container='container', yang_name="violate-action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  conform_action = __builtin__.property(_get_conform_action, _set_conform_action)
  exceed_action = __builtin__.property(_get_exceed_action, _set_exceed_action)
  violate_action = __builtin__.property(_get_violate_action, _set_violate_action)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('conform_action', conform_action), ('exceed_action', exceed_action), ('violate_action', violate_action), ])


class yc_scheduler_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers/scheduler. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of defined QoS traffic schedulers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence','__config','__state','__inputs','__output','__one_rate_two_color','__two_rate_three_color',)

  _yang_name = 'scheduler'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers', 'scheduler']

  def _get_sequence(self):
    """
    Getter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)

    YANG Description: Reference to the list key
    """
    return self.__sequence
      
  def _set_sequence(self, v, load=False):
    """
    Setter method for sequence, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/sequence (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence() directly.

    YANG Description: Reference to the list key
    """
    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=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__sequence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence(self):
    self.__sequence = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)

    YANG Description: Configuration data for QoS schedulers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)

    YANG Description: Operational state data for QoS schedulers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state data for QoS schedulers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_inputs(self):
    """
    Getter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)

    YANG Description: Enclosing container 
    """
    return self.__inputs
      
  def _set_inputs(self, v, load=False):
    """
    Setter method for inputs, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/inputs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inputs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inputs() directly.

    YANG Description: Enclosing container 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inputs_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inputs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inputs_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__inputs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inputs(self):
    self.__inputs = YANGDynClass(base=yc_inputs_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_inputs, is_container='container', yang_name="inputs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)

    YANG Description: Top-level container for scheduler output data
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/output (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_output is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_output() directly.

    YANG Description: Top-level container for scheduler output data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_output_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=yc_output_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_output, is_container='container', yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_one_rate_two_color(self):
    """
    Getter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    return self.__one_rate_two_color
      
  def _set_one_rate_two_color(self, v, load=False):
    """
    Setter method for one_rate_two_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/one_rate_two_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_one_rate_two_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_one_rate_two_color() directly.

    YANG Description: Top-level container for data related to a 1 rate, 2 color
shaper.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_one_rate_two_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """one_rate_two_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__one_rate_two_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_one_rate_two_color(self):
    self.__one_rate_two_color = YANGDynClass(base=yc_one_rate_two_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_one_rate_two_color, is_container='container', yang_name="one-rate-two-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_two_rate_three_color(self):
    """
    Getter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    return self.__two_rate_three_color
      
  def _set_two_rate_three_color(self, v, load=False):
    """
    Setter method for two_rate_three_color, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler/two_rate_three_color (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_two_rate_three_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_two_rate_three_color() directly.

    YANG Description: Top-level container for data for a 2 rate, 3 color policer.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_two_rate_three_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """two_rate_three_color must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__two_rate_three_color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_two_rate_three_color(self):
    self.__two_rate_three_color = YANGDynClass(base=yc_two_rate_three_color_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler_two_rate_three_color, is_container='container', yang_name="two-rate-three-color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  sequence = __builtin__.property(_get_sequence, _set_sequence)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  inputs = __builtin__.property(_get_inputs, _set_inputs)
  output = __builtin__.property(_get_output, _set_output)
  one_rate_two_color = __builtin__.property(_get_one_rate_two_color, _set_one_rate_two_color)
  two_rate_three_color = __builtin__.property(_get_two_rate_three_color, _set_two_rate_three_color)


  _pyangbind_elements = OrderedDict([('sequence', sequence), ('config', config), ('state', state), ('inputs', inputs), ('output', output), ('one_rate_two_color', one_rate_two_color), ('two_rate_three_color', two_rate_three_color), ])


class yc_schedulers_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy/schedulers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Schedulers within the scheduler policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler',)

  _yang_name = 'schedulers'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy', 'schedulers']

  def _get_scheduler(self):
    """
    Getter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)

    YANG Description: List of defined QoS traffic schedulers.
    """
    return self.__scheduler
      
  def _set_scheduler(self, v, load=False):
    """
    Setter method for scheduler, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers/scheduler (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler() directly.

    YANG Description: List of defined QoS traffic schedulers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler(self):
    self.__scheduler = YANGDynClass(base=YANGListType("sequence",yc_scheduler_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers_scheduler, yang_name="scheduler", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None), is_container='list', yang_name="scheduler", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler = __builtin__.property(_get_scheduler, _set_scheduler)


  _pyangbind_elements = OrderedDict([('scheduler', scheduler), ])


class yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies/scheduler-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__schedulers',)

  _yang_name = 'scheduler-policy'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'scheduler-policies', 'scheduler-policy']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)

    YANG Description: Reference to the name of the scheduler policy
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the scheduler policy
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_schedulers(self):
    """
    Getter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)

    YANG Description: Schedulers within the scheduler policy.
    """
    return self.__schedulers
      
  def _set_schedulers(self, v, load=False):
    """
    Setter method for schedulers, mapped from YANG variable /qos/scheduler_policies/scheduler_policy/schedulers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_schedulers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_schedulers() directly.

    YANG Description: Schedulers within the scheduler policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_schedulers_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """schedulers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__schedulers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_schedulers(self):
    self.__schedulers = YANGDynClass(base=yc_schedulers_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy_schedulers, is_container='container', yang_name="schedulers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  schedulers = __builtin__.property(_get_schedulers, _set_schedulers)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('schedulers', schedulers), ])


class yc_scheduler_policies_openconfig_qos_mem_mgmt__qos_scheduler_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/scheduler-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the list of configured scheduler policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__scheduler_policy',)

  _yang_name = 'scheduler-policies'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'scheduler-policies']

  def _get_scheduler_policy(self):
    """
    Getter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    return self.__scheduler_policy
      
  def _set_scheduler_policy(self, v, load=False):
    """
    Setter method for scheduler_policy, mapped from YANG variable /qos/scheduler_policies/scheduler_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policy() directly.

    YANG Description: List of scheduler policies. A scheduler policy is a set of schedulers
that are to be applied together. Each scheduler within a scheduler
policy takes an input, and outputs it according to a scheduling
discipline that is specified within it. The schedulers consume
resources according to the specification that is provided - which
may be absolute resource limits, or relative.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__scheduler_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policy(self):
    self.__scheduler_policy = YANGDynClass(base=YANGListType("name",yc_scheduler_policy_openconfig_qos_mem_mgmt__qos_scheduler_policies_scheduler_policy, yang_name="scheduler-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="scheduler-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  scheduler_policy = __builtin__.property(_get_scheduler_policy, _set_scheduler_policy)


  _pyangbind_elements = OrderedDict([('scheduler_policy', scheduler_policy), ])


class yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a buffer-allocation-profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string identifying the buffer allocation profile, used to
reference to the profile on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=True)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer, _set_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer, _set_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type, _set_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit, _set_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor, _set_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__dedicated_buffer','__use_shared_buffer','__shared_buffer_limit_type','__static_shared_buffer_limit','__dynamic_limit_scaling_factor',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', 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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the queue being referenced within the buffer allocation profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=False)


  def _get_dedicated_buffer(self):
    """
    Getter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    return self.__dedicated_buffer
      
  def _set_dedicated_buffer(self, v, load=False):
    """
    Setter method for dedicated_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dedicated_buffer (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dedicated_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dedicated_buffer() directly.

    YANG Description: This is the dedicated buffer that is carved for the queue, this is the minimum
number of bytes reserved for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dedicated_buffer must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__dedicated_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dedicated_buffer(self):
    self.__dedicated_buffer = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dedicated-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_use_shared_buffer(self):
    """
    Getter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    return self.__use_shared_buffer
      
  def _set_use_shared_buffer(self, v, load=False):
    """
    Setter method for use_shared_buffer, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/use_shared_buffer (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_shared_buffer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_shared_buffer() directly.

    YANG Description: If the flag is true, then the queue is allowed to use buffers from shared pool
in additional to the dedicated buffers assigned for this queue.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_shared_buffer must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__use_shared_buffer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_shared_buffer(self):
    self.__use_shared_buffer = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-shared-buffer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_shared_buffer_limit_type(self):
    """
    Getter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    return self.__shared_buffer_limit_type
      
  def _set_shared_buffer_limit_type(self, v, load=False):
    """
    Setter method for shared_buffer_limit_type, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/shared_buffer_limit_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shared_buffer_limit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shared_buffer_limit_type() directly.

    YANG Description: The type of limit used to specify the amount of buffer space that the queue
is allowed to use from the shared pool.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shared_buffer_limit_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-qos:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)""",
        })

    self.__shared_buffer_limit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shared_buffer_limit_type(self):
    self.__shared_buffer_limit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:STATIC': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}, 'oc-qos:DYNAMIC_BASED_ON_SCALING_FACTOR': {'@module': 'openconfig-qos', '@namespace': 'http://openconfig.net/yang/qos'}},), is_leaf=True, yang_name="shared-buffer-limit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='identityref', is_config=False)


  def _get_static_shared_buffer_limit(self):
    """
    Getter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    return self.__static_shared_buffer_limit
      
  def _set_static_shared_buffer_limit(self, v, load=False):
    """
    Setter method for static_shared_buffer_limit, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/static_shared_buffer_limit (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_shared_buffer_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_shared_buffer_limit() directly.

    YANG Description: If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is
the maximum number of bytes that the queue is allowed to use from the shared
pool.
    """
    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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_shared_buffer_limit 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="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__static_shared_buffer_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_shared_buffer_limit(self):
    self.__static_shared_buffer_limit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="static-shared-buffer-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_dynamic_limit_scaling_factor(self):
    """
    Getter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    return self.__dynamic_limit_scaling_factor
      
  def _set_dynamic_limit_scaling_factor(self, v, load=False):
    """
    Setter method for dynamic_limit_scaling_factor, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state/dynamic_limit_scaling_factor (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_limit_scaling_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_limit_scaling_factor() directly.

    YANG Description: If shared-buffer-limit-type is DYNAMIC_BASED_ON_SCALING_FACTOR, the scaling
factor and the current free space in the shared pool is used to determine the
maximum buffer sapce from the shared pool that the queue is allowed to use.

Example: If a queue is using 79MB and the other queues are using 11MB, the
free buffer is 10MB. If the configured scaling factor is 3 for the queue, the
maximum buffer space from the shared pool that the queue is allowed to use is
calculated as (free buffer * 2^scaling factor) ie. 10MB*2^3 = 80MB. Since the
current usage is 79MB which is < 80MB, the packet is queued.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_limit_scaling_factor must be of a type compatible with int32""",
          'defined-type': "int32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)""",
        })

    self.__dynamic_limit_scaling_factor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_limit_scaling_factor(self):
    self.__dynamic_limit_scaling_factor = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="dynamic-limit-scaling-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='int32', is_config=False)

  name = __builtin__.property(_get_name)
  dedicated_buffer = __builtin__.property(_get_dedicated_buffer)
  use_shared_buffer = __builtin__.property(_get_use_shared_buffer)
  shared_buffer_limit_type = __builtin__.property(_get_shared_buffer_limit_type)
  static_shared_buffer_limit = __builtin__.property(_get_static_shared_buffer_limit)
  dynamic_limit_scaling_factor = __builtin__.property(_get_dynamic_limit_scaling_factor)


  _pyangbind_elements = OrderedDict([('name', name), ('dedicated_buffer', dedicated_buffer), ('use_shared_buffer', use_shared_buffer), ('shared_buffer_limit_type', shared_buffer_limit_type), ('static_shared_buffer_limit', static_shared_buffer_limit), ('dynamic_limit_scaling_factor', dynamic_limit_scaling_factor), ])


class yc_queue_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues/queue. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Buffer allocation profile for a specific queue on the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state',)

  _yang_name = 'queue'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues', 'queue']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the name of the queue being referenced under the buffer
allocation profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to a queue within a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a queue wtihin a buffer allocation
profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ])


class yc_queues_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile', 'queues']

  def _get_queue(self):
    """
    Getter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    return self.__queue
      
  def _set_queue(self, v, load=False):
    """
    Setter method for queue, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues/queue (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue() directly.

    YANG Description: Buffer allocation profile for a specific queue on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue(self):
    self.__queue = YANGDynClass(base=YANGListType("name",yc_queue_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues_queue, yang_name="queue", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue = __builtin__.property(_get_queue, _set_queue)


  _pyangbind_elements = OrderedDict([('queue', queue), ])


class yc_buffer_allocation_profile_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles/buffer-allocation-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__queues',)

  _yang_name = 'buffer-allocation-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'buffer-allocation-profiles', 'buffer-allocation-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used as a key for each buffer profile.
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters for a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to a buffer-allocation-profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Surrounding container for the queues that are referenced under a
buffer-allocation-policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  queues = __builtin__.property(_get_queues, _set_queues)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('queues', queues), ])


class yc_buffer_allocation_profiles_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/buffer-allocation-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for buffer allocation profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__buffer_allocation_profile',)

  _yang_name = 'buffer-allocation-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'buffer-allocation-profiles']

  def _get_buffer_allocation_profile(self):
    """
    Getter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    return self.__buffer_allocation_profile
      
  def _set_buffer_allocation_profile(self, v, load=False):
    """
    Setter method for buffer_allocation_profile, mapped from YANG variable /qos/buffer_allocation_profiles/buffer_allocation_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profile() directly.

    YANG Description: A buffer allocation profile describes a mapping between the queues
that are instantiated on an interface and the memory that is allocated
to them on the forwarding complex that they are instantiated. Profiles
(like queues) are defined in the abstract and instantiated by being
configured on a particular interface. Separate allocation profiles may
be used for ingress and egress traffic, with the profile being specified
within the /qos/interfaces/interface list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__buffer_allocation_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profile(self):
    self.__buffer_allocation_profile = YANGDynClass(base=YANGListType("name",yc_buffer_allocation_profile_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles_buffer_allocation_profile, yang_name="buffer-allocation-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="buffer-allocation-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  buffer_allocation_profile = __builtin__.property(_get_buffer_allocation_profile, _set_buffer_allocation_profile)


  _pyangbind_elements = OrderedDict([('buffer_allocation_profile', buffer_allocation_profile), ])


class yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the queue
management profile.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)

    YANG Description: Unique string name used for the queue management profile.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Unique string name used for the queue management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=True)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)
  weight = __builtin__.property(_get_weight, _set_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent, _set_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the WRED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop','__weight','__max_drop_probability_percent',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/weight (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_weight is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_weight() directly.

    YANG Description: The average queue size depends on the previous average as well as
the current size of the queue.

average queue size = (previous average queue size)*(1-2^{-n})+
                    (current queue size)*(2^{-n})

where n is the user-configurable exponential weight factor.

The previous average is more important for high values of n. Peaks
and lows in queue size are smoothed by a high value. For low values
of n, the average queue size is close to the current queue size.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint32', is_config=False)


  def _get_max_drop_probability_percent(self):
    """
    Getter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    return self.__max_drop_probability_percent
      
  def _set_max_drop_probability_percent(self, v, load=False):
    """
    Setter method for max_drop_probability_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state/max_drop_probability_percent (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_drop_probability_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_drop_probability_percent() directly.

    YANG Description: If the queue depth is between min and max threshold then this
the probability with which packets are dropped or marked.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_drop_probability_percent must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__max_drop_probability_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_drop_probability_percent(self):
    self.__max_drop_probability_percent = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="max-drop-probability-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='oc-types:percentage', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)
  weight = __builtin__.property(_get_weight)
  max_drop_probability_percent = __builtin__.property(_get_max_drop_probability_percent)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ('weight', weight), ('max_drop_probability_percent', max_drop_probability_percent), ])


class yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/wred/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)

    YANG Description: Configuration parameters relating to the WRED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)

    YANG Description: Operational state parameters relating to the WRED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the WRED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_wred_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/wred. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'wred'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'wred']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform WRED parameters. These parameters are applied to all the
traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'config']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=True)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=True)

  min_threshold = __builtin__.property(_get_min_threshold, _set_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold, _set_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent, _set_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent, _set_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn, _set_enable_ecn)
  drop = __builtin__.property(_get_drop, _set_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to the RED.
  """
  __slots__ = ('_path_helper', '_extmethods', '__min_threshold','__max_threshold','__min_threshold_percent','__max_threshold_percent','__enable_ecn','__drop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', 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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform', 'state']

  def _get_min_threshold(self):
    """
    Getter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    return self.__min_threshold
      
  def _set_min_threshold(self, v, load=False):
    """
    Setter method for min_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in bytes.
When the average queue length is less than minth, all packets are admitted
to the queue.  Mututally exclusive with min-threshold-percent and
max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold(self):
    self.__min_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold(self):
    """
    Getter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    return self.__max_threshold
      
  def _set_max_threshold(self, v, load=False):
    """
    Setter method for max_threshold, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in bytes.
When the average queue length exceeds the maxth value, all packets are
dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold-percent and max-threshold-percent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold(self):
    self.__max_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_min_threshold_percent(self):
    """
    Getter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    return self.__min_threshold_percent
      
  def _set_min_threshold_percent(self, v, load=False):
    """
    Setter method for min_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/min_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_threshold_percent() directly.

    YANG Description: The mininum threshold parameter for a RED-managed queue in percent.
When the average queue length is less than minth, all packets are
admitted to the queue.  Mutually exclusive with min-threshold and
max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__min_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_threshold_percent(self):
    self.__min_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_max_threshold_percent(self):
    """
    Getter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    return self.__max_threshold_percent
      
  def _set_max_threshold_percent(self, v, load=False):
    """
    Setter method for max_threshold_percent, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/max_threshold_percent (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_threshold_percent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_threshold_percent() directly.

    YANG Description: The maximum threshold parameter for a RED-managed queue in percent.
When the average queue length exceeds the maxth value, all packets
are dropped (or marked if ECN is enabled).  Mutually exclusive with
min-threshold and max-threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_threshold_percent must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)""",
        })

    self.__max_threshold_percent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_threshold_percent(self):
    self.__max_threshold_percent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-threshold-percent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='uint64', is_config=False)


  def _get_enable_ecn(self):
    """
    Getter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    return self.__enable_ecn
      
  def _set_enable_ecn(self, v, load=False):
    """
    Setter method for enable_ecn, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/enable_ecn (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_ecn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_ecn() directly.

    YANG Description: When this leaf is true and the number of packets in the queue
is between the minimum threshold and the maximum threshold, if
the ECN field on the packet indicates that the endpoints are ECN
capable (that is, the ECT bit is set to 1 and the CE bit is set
to 0, or the ECT bit is set to 0 and the CE bit is set to 1) and
the WRED algorithm determines that the packet should have been
dropped based on the drop probability, the ECT and CE bits for
the packet are changed to 1, and the packet is transmitted.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_ecn must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__enable_ecn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_ecn(self):
    self.__enable_ecn = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-ecn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)


  def _get_drop(self):
    """
    Getter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    return self.__drop
      
  def _set_drop(self, v, load=False):
    """
    Setter method for drop, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state/drop (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_drop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_drop() directly.

    YANG Description: When this leaf is true and the packet and if the ECN field in
the packet indicates that the endpoints are not ECN capable and
the and the WRED algorithm determines that the packet should
have been dropped based on the drop probability, the packet
is dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """drop must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)""",
        })

    self.__drop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_drop(self):
    self.__drop = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="drop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='boolean', is_config=False)

  min_threshold = __builtin__.property(_get_min_threshold)
  max_threshold = __builtin__.property(_get_max_threshold)
  min_threshold_percent = __builtin__.property(_get_min_threshold_percent)
  max_threshold_percent = __builtin__.property(_get_max_threshold_percent)
  enable_ecn = __builtin__.property(_get_enable_ecn)
  drop = __builtin__.property(_get_drop)


  _pyangbind_elements = OrderedDict([('min_threshold', min_threshold), ('max_threshold', max_threshold), ('min_threshold_percent', min_threshold_percent), ('max_threshold_percent', max_threshold_percent), ('enable_ecn', enable_ecn), ('drop', drop), ])


class yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/red/uniform. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'uniform'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red', 'uniform']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)

    YANG Description: Configuration parameters relating to the RED.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)

    YANG Description: Operational state parameters relating to the RED.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the RED.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ])


class yc_red_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile/red. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
  """
  __slots__ = ('_path_helper', '_extmethods', '__uniform',)

  _yang_name = 'red'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile', 'red']

  def _get_uniform(self):
    """
    Getter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    return self.__uniform
      
  def _set_uniform(self, v, load=False):
    """
    Setter method for uniform, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red/uniform (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uniform is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uniform() directly.

    YANG Description: Uniform RED parameters. These parameters are applied to all
the traffic coming into system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uniform must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__uniform = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uniform(self):
    self.__uniform = YANGDynClass(base=yc_uniform_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red_uniform, is_container='container', yang_name="uniform", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  uniform = __builtin__.property(_get_uniform, _set_uniform)


  _pyangbind_elements = OrderedDict([('uniform', uniform), ])


class yc_queue_management_profile_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles/queue-management-profile. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__wred','__red',)

  _yang_name = 'queue-management-profile'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos', 'queue-management-profiles', 'queue-management-profile']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Reference to the unique name used to reference the queue
management profile
    """
    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=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)""",
        })

    self.__name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_name(self):
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/config (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_config is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_config() directly.

    YANG Description: Configuration parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """config must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__config = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_config(self):
    self.__config = YANGDynClass(base=yc_config_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/state (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state() directly.

    YANG Description: Operational state parameters relating to the queue
management profile.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state(self):
    self.__state = YANGDynClass(base=yc_state_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_wred(self):
    """
    Getter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    return self.__wred
      
  def _set_wred(self, v, load=False):
    """
    Setter method for wred, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/wred (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_wred is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_wred() directly.

    YANG Description: Configuration and operational state parameters relating to
Weighted Random Early Detection (WRED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_wred_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """wred must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_wred_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__wred = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_wred(self):
    self.__wred = YANGDynClass(base=yc_wred_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_wred, is_container='container', yang_name="wred", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_red(self):
    """
    Getter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    return self.__red
      
  def _set_red(self, v, load=False):
    """
    Setter method for red, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile/red (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_red is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_red() directly.

    YANG Description: Configuration and operational state parameters
relating to Random Early Detection (RED).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_red_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """red must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_red_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__red = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_red(self):
    self.__red = YANGDynClass(base=yc_red_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile_red, is_container='container', yang_name="red", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  wred = __builtin__.property(_get_wred, _set_wred)
  red = __builtin__.property(_get_red, _set_red)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('wred', wred), ('red', red), ])


class yc_queue_management_profiles_openconfig_qos_mem_mgmt__qos_queue_management_profiles(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos/queue-management-profiles. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the list of configured
queue management profiles.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queue_management_profile',)

  _yang_name = 'queue-management-profiles'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

    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 ['qos', 'queue-management-profiles']

  def _get_queue_management_profile(self):
    """
    Getter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    return self.__queue_management_profile
      
  def _set_queue_management_profile(self, v, load=False):
    """
    Setter method for queue_management_profile, mapped from YANG variable /qos/queue_management_profiles/queue_management_profile (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profile is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profile() directly.

    YANG Description: A queue management profile within the OpenConfig QoS model
specifies how packets are ECN marked/dropped for a particular
instance of a queue on a particular interface. for example,
whether RED, or WRED is applied to manage the queue's occupancy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_queue_management_profile_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profile must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)""",
        })

    self.__queue_management_profile = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profile(self):
    self.__queue_management_profile = YANGDynClass(base=YANGListType("name",yc_queue_management_profile_openconfig_qos_mem_mgmt__qos_queue_management_profiles_queue_management_profile, yang_name="queue-management-profile", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="queue-management-profile", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='list', is_config=True)

  queue_management_profile = __builtin__.property(_get_queue_management_profile, _set_queue_management_profile)


  _pyangbind_elements = OrderedDict([('queue_management_profile', queue_management_profile), ])


class yc_qos_openconfig_qos_mem_mgmt__qos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /qos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for QoS data
  """
  __slots__ = ('_path_helper', '_extmethods', '__interfaces','__classifiers','__forwarding_groups','__queues','__scheduler_policies','__buffer_allocation_profiles','__queue_management_profiles',)

  _yang_name = 'qos'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_mem_mgmt__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_mem_mgmt__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_mem_mgmt__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_mem_mgmt__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 ['qos']

  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /qos/interfaces (container)

    YANG Description: Enclosing container for the list of interface references
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /qos/interfaces (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interfaces is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interfaces() directly.

    YANG Description: Enclosing container for the list of interface references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_qos_mem_mgmt__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interfaces must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interfaces_openconfig_qos_mem_mgmt__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__interfaces = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interfaces(self):
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_qos_mem_mgmt__qos_interfaces, is_container='container', yang_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_classifiers(self):
    """
    Getter method for classifiers, mapped from YANG variable /qos/classifiers (container)

    YANG Description: Enclosing container for QoS classifiers
    """
    return self.__classifiers
      
  def _set_classifiers(self, v, load=False):
    """
    Setter method for classifiers, mapped from YANG variable /qos/classifiers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_classifiers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_classifiers() directly.

    YANG Description: Enclosing container for QoS classifiers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_classifiers_openconfig_qos_mem_mgmt__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """classifiers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__classifiers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_classifiers(self):
    self.__classifiers = YANGDynClass(base=yc_classifiers_openconfig_qos_mem_mgmt__qos_classifiers, is_container='container', yang_name="classifiers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_forwarding_groups(self):
    """
    Getter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)

    YANG Description: Enclosing container for list of forwarding groups
    """
    return self.__forwarding_groups
      
  def _set_forwarding_groups(self, v, load=False):
    """
    Setter method for forwarding_groups, mapped from YANG variable /qos/forwarding_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_groups() directly.

    YANG Description: Enclosing container for list of forwarding groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_groups_openconfig_qos_mem_mgmt__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_groups_openconfig_qos_mem_mgmt__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__forwarding_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_groups(self):
    self.__forwarding_groups = YANGDynClass(base=yc_forwarding_groups_openconfig_qos_mem_mgmt__qos_forwarding_groups, is_container='container', yang_name="forwarding-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /qos/queues (container)

    YANG Description: Enclosing container for the list of queues
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /qos/queues (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queues is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queues() directly.

    YANG Description: Enclosing container for the list of queues
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_qos_mem_mgmt__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queues must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_qos_mem_mgmt__qos_queues, is_container='container', yang_name="queues", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_scheduler_policies(self):
    """
    Getter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    return self.__scheduler_policies
      
  def _set_scheduler_policies(self, v, load=False):
    """
    Setter method for scheduler_policies, mapped from YANG variable /qos/scheduler_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scheduler_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scheduler_policies() directly.

    YANG Description: Enclosing container for the list of configured scheduler policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_scheduler_policies_openconfig_qos_mem_mgmt__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scheduler_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_scheduler_policies_openconfig_qos_mem_mgmt__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__scheduler_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scheduler_policies(self):
    self.__scheduler_policies = YANGDynClass(base=yc_scheduler_policies_openconfig_qos_mem_mgmt__qos_scheduler_policies, is_container='container', yang_name="scheduler-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_buffer_allocation_profiles(self):
    """
    Getter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    return self.__buffer_allocation_profiles
      
  def _set_buffer_allocation_profiles(self, v, load=False):
    """
    Setter method for buffer_allocation_profiles, mapped from YANG variable /qos/buffer_allocation_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_buffer_allocation_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_buffer_allocation_profiles() directly.

    YANG Description: Surrounding container for buffer allocation profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_buffer_allocation_profiles_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """buffer_allocation_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__buffer_allocation_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_buffer_allocation_profiles(self):
    self.__buffer_allocation_profiles = YANGDynClass(base=yc_buffer_allocation_profiles_openconfig_qos_mem_mgmt__qos_buffer_allocation_profiles, is_container='container', yang_name="buffer-allocation-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)


  def _get_queue_management_profiles(self):
    """
    Getter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    return self.__queue_management_profiles
      
  def _set_queue_management_profiles(self, v, load=False):
    """
    Setter method for queue_management_profiles, mapped from YANG variable /qos/queue_management_profiles (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queue_management_profiles is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queue_management_profiles() directly.

    YANG Description: Surrounding container for the list of configured
queue management profiles.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queue_management_profiles_openconfig_qos_mem_mgmt__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queue_management_profiles must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_mem_mgmt__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__queue_management_profiles = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queue_management_profiles(self):
    self.__queue_management_profiles = YANGDynClass(base=yc_queue_management_profiles_openconfig_qos_mem_mgmt__qos_queue_management_profiles, is_container='container', yang_name="queue-management-profiles", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  classifiers = __builtin__.property(_get_classifiers, _set_classifiers)
  forwarding_groups = __builtin__.property(_get_forwarding_groups, _set_forwarding_groups)
  queues = __builtin__.property(_get_queues, _set_queues)
  scheduler_policies = __builtin__.property(_get_scheduler_policies, _set_scheduler_policies)
  buffer_allocation_profiles = __builtin__.property(_get_buffer_allocation_profiles, _set_buffer_allocation_profiles)
  queue_management_profiles = __builtin__.property(_get_queue_management_profiles, _set_queue_management_profiles)


  _pyangbind_elements = OrderedDict([('interfaces', interfaces), ('classifiers', classifiers), ('forwarding_groups', forwarding_groups), ('queues', queues), ('scheduler_policies', scheduler_policies), ('buffer_allocation_profiles', buffer_allocation_profiles), ('queue_management_profiles', queue_management_profiles), ])


class openconfig_qos_mem_mgmt(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-mem-mgmt - based on the path /openconfig-qos-mem-mgmt. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This submodule defines configuration and operational state
data associated related to queue management features of QoS
particularly:

- buffer-allocation-profiles: these profiles are applied on
 a per-interface basis, and determine how memory is to be managed
 across the queues that are instantiated on the system.

- queue-management-profiles: these profiles are applied on a per-interface
 per-queue basis, and determine how packets are marked/dropped within
 the queue instantiation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__qos',)

  _yang_name = 'openconfig-qos-mem-mgmt'
  _yang_namespace = 'http://openconfig.net/yang/qos'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_mem_mgmt__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

    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 []

  def _get_qos(self):
    """
    Getter method for qos, mapped from YANG variable /qos (container)

    YANG Description: Top-level container for QoS data
    """
    return self.__qos
      
  def _set_qos(self, v, load=False):
    """
    Setter method for qos, mapped from YANG variable /qos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_qos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_qos() directly.

    YANG Description: Top-level container for QoS data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_qos_openconfig_qos_mem_mgmt__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """qos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_qos_openconfig_qos_mem_mgmt__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)""",
        })

    self.__qos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_qos(self):
    self.__qos = YANGDynClass(base=yc_qos_openconfig_qos_mem_mgmt__qos, is_container='container', yang_name="qos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/qos', defining_module='openconfig-qos', yang_type='container', is_config=True)

  qos = __builtin__.property(_get_qos, _set_qos)


  _pyangbind_elements = OrderedDict([('qos', qos), ])


class openconfig_qos_types(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-qos-types - based on the path /openconfig-qos-types. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This module defines types and identities used in OpenConfig
models related to quality-of-service (QoS)
  """
  _pyangbind_elements = {}

  

